#include <bits/stdc++.h>
using namespace std;
int vis[1000005];
double a[1000005];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int num = 0;
    int n;
    scanf("%d", &n);
    int m = 0;
    for (int i = 0; i < n; i++) {
      int x;
      scanf("%d", &x);
      vis[x]++;
      m = max(m, x);
    }
    for (int i = 1; i <= m; i++) {
      while (vis[i] >= 2) {
        a[num++] = 1.0 * i;
        vis[i] -= 2;
      }
      vis[i] = 0;
    }
    int flag = 0;
    int l, r;
    double ans = 0x3f3f3f3f;
    for (int i = 1; i < num; i++) {
      if (a[i] == a[i - 1]) {
        flag = 1;
        printf("%d %d %d %d\n", (int)a[i], (int)a[i], (int)a[i], (int)a[i]);
        break;
      } else {
        if (ans > (a[i] / a[i - 1] + a[i - 1] / a[i] + 2)) {
          ans = (a[i] / a[i - 1] + a[i - 1] / a[i] + 2);
          l = (int)a[i];
          r = (int)a[i - 1];
        }
      }
    }
    if (!flag) printf("%d %d %d %d\n", l, l, r, r);
  }
  return 0;
}
