// Arup Guha
// 12/23/2020
// Solution to 2020 Dec USACO Bronze Problem: 

import java.util.*;

public class abc {

	public static void main(String[] args) {
	
		// Read in values.
		Scanner stdin = new Scanner(System.in);
		int[] vals = new int[7];
		for (int i=0; i<7; i++)
			 vals[i] = stdin.nextInt();
			 
		// Sorting helps.
		Arrays.sort(vals);
		
		// Since all are positive, a+b+c is at the end and a and b are at the beginning.
		int c = vals[6] - vals[1] - vals[0];
		
		// Ta da!
		System.out.println(vals[0]+" "+vals[1]+" "+c);
	}
}