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

ans = 10 * c + b + a

print(ans)

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

print((10*c + b + a))



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

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

-ans = 10 * c + b + a -print(ans) +print((10 * c + b + a))