def getN():

    return int(eval(input()))



def getMN():

    a = input().split()

    b = [int(i) for i in a]

    return b[0],b[1]



def getlist():

    a = input().split()

    b = [int(i) for i in a]

    return b



a,b,c = getlist()

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

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



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



print((sum([a,b,c]) + 9*big))
def getN():
    return int(eval(input()))


def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0], b[1]


def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b


a, b, c = getlist()
m = max([a, b, c])
print((10 * m + a + b + c - m))

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

-def getN(): -    return int(eval(input())) - - -def getMN(): -    a = input().split() -    b = [int(i) for i in a] -    return b[0], b[1] - - -def getlist(): -    a = input().split() -    b = [int(i) for i in a] -    return b - - -a, b, c = getlist() -m = max([a, b, c]) -print((10 * m + a + b + c - m)) +a, b, c = list(map(int, input().split())) +big = max([a, b, c]) +print((sum([a, b, c]) + 9 * big))