import sys

for i in sorted(map(int,sys.stdin))[:-4:-1]:print(i)
import sys

x=sorted(map(int,sys.stdin))[:-4:-1]

for i in x:print(i)
import sys

for i in sorted(map(int, sys.stdin))[:-4:-1]:
    print(i)

import sys

x = sorted(map(int, sys.stdin))[:-4:-1]
for i in x:
    print(i)

-for i in sorted(map(int, sys.stdin))[:-4:-1]: +x = sorted(map(int, sys.stdin))[:-4:-1] +for i in x: