a, b, c = sorted(map(int, input().split()))



print((c*10 + b + a))
a, b, c = list(map(int, input().split()))



print((max(a, b, c)*9 + (a + b + c)))
a, b, c = sorted(map(int, input().split()))
print((c * 10 + b + a))

a, b, c = list(map(int, input().split()))
print((max(a, b, c) * 9 + (a + b + c)))

-a, b, c = sorted(map(int, input().split())) -print((c * 10 + b + a)) +a, b, c = list(map(int, input().split())) +print((max(a, b, c) * 9 + (a + b + c)))