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

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

mx = max([a, b, c])

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

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

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