n = int(eval(input()))

ls = sorted(map(int, input().split()))

res = [ls[-1]]

ds = [(i, abs(x - ls[-1] / 2)) for i, x in enumerate(ls[:-1])]

ds.sort(key=lambda x: x[1])

res.append(ls[ds[0][0]])

print((*res))
n = int(eval(input()))

ls = sorted(map(int, input().split()))

ds = [abs(x - ls[-1] / 2) for x in ls[:-1]]

print((ls[-1], ls[ds.index(min(ds))]))
n = int(eval(input()))
ls = sorted(map(int, input().split()))
res = [ls[-1]]
ds = [(i, abs(x - ls[-1] / 2)) for i, x in enumerate(ls[:-1])]
ds.sort(key=lambda x: x[1])
res.append(ls[ds[0][0]])
print((*res))

n = int(eval(input()))
ls = sorted(map(int, input().split()))
ds = [abs(x - ls[-1] / 2) for x in ls[:-1]]
print((ls[-1], ls[ds.index(min(ds))]))

-res = [ls[-1]] -ds = [(i, abs(x - ls[-1] / 2)) for i, x in enumerate(ls[:-1])] -ds.sort(key=lambda x: x[1]) -res.append(ls[ds[0][0]]) -print((*res)) +ds = [abs(x - ls[-1] / 2) for x in ls[:-1]] +print((ls[-1], ls[ds.index(min(ds))]))