#include <bits/stdc++.h>
using namespace std;
int Vertex[1000001];
int vSize;
bool Freq[10001] = {0};
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    vSize = 0;
    int N;
    scanf("%d", &N);
    memset(Freq, 0, sizeof(Freq));
    for (int i = 1; i <= N; i++) {
      int x;
      scanf("%d", &x);
      if (!Freq[x])
        Freq[x] = 1;
      else if (Freq[x]) {
        Freq[x] = 0;
        Vertex[++vSize] = x;
      }
    }
    sort(Vertex + 1, Vertex + 1 + vSize);
    int bestIdx = -1;
    long double minRap = 1000001;
    for (int i = 1; i < vSize; i++) {
      if ((long double)Vertex[i + 1] / Vertex[i] +
              (long double)Vertex[i] / Vertex[i + 1] <
          minRap) {
        minRap = (long double)Vertex[i + 1] / Vertex[i] +
                 (long double)Vertex[i] / Vertex[i + 1];
        bestIdx = i;
      }
    }
    printf("%d %d %d %d\n", Vertex[bestIdx], Vertex[bestIdx],
           Vertex[bestIdx + 1], Vertex[bestIdx + 1]);
  }
}
