for t in range(int(input())):
    n=int(input())
    l=list(map(int,input().split()))
    l1=[0]*10001
    a=0
    for j in l:
        l1[j]+=1
        if l1[j]==4:
            a=j
    if a:
        print(a,a,a,a)
    else:
        c=0
        x=0
        for j in range(1,10001):
            if l1[j]>=2:
                c+=1
                if c==1:
                    a=j
                elif c==2:
                    b=j
                    d=b-a
                else:
                    if j-x<=b-a:
                        a,b=x,j
                x=j
        print(a,a,b,b)