Do You Know Your ABCs?

Algorithm

The smallest is A, the second smallest is B, and C is the largest minus A and B.

Python

vals = sorted(list(map(int,input().split()))); print(vals[0],vals[1],vals[6]-vals[0]-vals[1])