
mt=[]
high=[0,0,0]
for i in range(10):
    mt.append(int(input()))
    if  mt[i] > high[0]:
        high=[mt[i]]+high[:2]
    elif mt[i] > high[1]:
        high=[high[0]]+[mt[i]]+[high[1]]
    elif mt[i] > high[2]:
        high=high[:2]+[mt[i]]
print ('\n'.join(map(str,high))) mt=[] mt [] high=[0,0,0] high [0,0,0] 0 0 0 for i in range(10):
    mt.append(int(input()))
    if  mt[i] > high[0]:
        high=[mt[i]]+high[:2]
    elif mt[i] > high[1]:
        high=[high[0]]+[mt[i]]+[high[1]]
    elif mt[i] > high[2]:
        high=high[:2]+[mt[i]] i range(10) range 10 mt.append(int(input())) mt.append mt append int(input()) int input() input if  mt[i] > high[0]:
        high=[mt[i]]+high[:2]
    elif mt[i] > high[1]:
        high=[high[0]]+[mt[i]]+[high[1]]
    elif mt[i] > high[2]:
        high=high[:2]+[mt[i]] mt[i] > high[0] mt[i] mt i high[0] high 0 high=[mt[i]]+high[:2] high [mt[i]]+high[:2] [mt[i]] mt[i] mt i high[:2] high :2 2 elif mt[i] > high[1]:
        high=[high[0]]+[mt[i]]+[high[1]]
     mt[i] > high[1] mt[i] mt i high[1] high 1 high=[high[0]]+[mt[i]]+[high[1]] high [high[0]]+[mt[i]]+[high[1]] [high[0]]+[mt[i]] [high[0]] high[0] high 0 [mt[i]] mt[i] mt i [high[1]] high[1] high 1 elif mt[i] > high[2]:
        high=high[:2]+[mt[i]] mt[i] > high[2] mt[i] mt i high[2] high 2 high=high[:2]+[mt[i]] high high[:2]+[mt[i]] high[:2] high :2 2 [mt[i]] mt[i] mt i print ('\n'.join(map(str,high))) print '\n'.join(map(str,high)) '\n'.join '\n' join map(str,high) map str high high=[high[0]]+[mt[i]]+[high[1]] [high[0]]+[mt[i]]+[high[1]] high mt=[] [] mt high=high[:2]+[mt[i]] high[:2]+[mt[i]] high high=[0,0,0] [0,0,0] high high=[mt[i]]+high[:2] [mt[i]]+high[:2] high

mt=[]
high=[0,0,0]
for i in range(10):
    mt.append(int(input()))
    if  mt[i] > high[0]:
        high=[mt[i]]+high[:2]
    elif mt[i] > high[1]:
        high=[high[0]]+[mt[i]]+[high[1]]
    elif mt[i] > high[2]:
        high=high[:2]+[mt[i]]
print ('\n'.join(map(str,high)))