def solve(m):
    m.sort()
    for i in range(len(m)):
        if(m[i-2]<m[i-1]<m[i]):
            if(m[i-2]**2 + m[i-1]**2 == m[i]**2):
                print(str(m[i-2])+' '+str(m[i-1])+' '+str(m[i]))
        else:
            return -1
        
if __name__ == '__main__':
    t = int(input())
    for i in range(t):
        n = int(input())
        m = list(map(int, input().split()))
    print(solve(m))
    
