#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 100;
int a[N], b[N];
vector<int> v, v1;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      int x;
      scanf("%d", &x);
      if (!a[x]) {
        v.push_back(x);
      }
      a[x]++;
    }
    sort(v.begin(), v.end());
    int cn = 0;
    for (int i = 0; i < v.size(); i++) {
      while (a[v[i]] >= 2) {
        b[cn++] = v[i];
        a[v[i]] -= 2;
      }
      a[v[i]] = 0;
    }
    v.clear();
    sort(b, b + cn);
    double mx = 12345678.0;
    int id = 0;
    for (int i = 1; i < cn; i++) {
      double d1 = b[i], d2 = b[i - 1];
      double ans = (2.0 * (d1 + d2));
      ans = (ans * ans) / (d1 * d2);
      if (mx > ans) {
        mx = ans;
        id = i;
      }
    }
    printf("%d %d %d %d\n", b[id - 1], b[id], b[id], b[id - 1]);
  }
}
