#include <bits/stdc++.h>
using namespace std;
int t, n;
int a[1000010], sum[1000010];
int x, y;
void check(int xx, int yy) {
  if (x == -1) {
    x = xx;
    y = yy;
    return;
  }
  double xt = double(x);
  double yt = double(y);
  double xc = double(xx);
  double yc = double(yy);
  if ((xt + yt) * (xt + yt) / (xt * yt) > (xc + yc) * (xc + yc) / (xc * yc)) {
    x = xx;
    y = yy;
  }
}
int main() {
  scanf("%d", &t);
  while (t--) {
    x = -1;
    y = -1;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    sort(a + 1, a + 1 + n);
    int las = 0;
    for (int i = 1; i <= n; i++) {
      sum[a[i]]++;
      if (sum[a[i]] == 2) {
        if (las != 0) check(las, a[i]);
        las = a[i];
      }
      if (sum[a[i]] == 4) {
        x = a[i];
        y = a[i];
        break;
      }
    }
    for (int i = 1; i <= n; i++) sum[a[i]] = 0;
    printf("%d %d %d %d\n", x, y, y, x);
  }
}
