#include <bits/stdc++.h>
using namespace std;
int T, n, a[1010000], cnt[10100];
vector<int> vec;
int main(void) {
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    vec.clear();
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      cnt[a[i]]++;
      vec.push_back(a[i]);
    }
    sort(vec.begin(), vec.end());
    vec.erase(unique(vec.begin(), vec.end()), vec.end());
    int lst = -1, ans1, ans2;
    long long up = 0, down = 0;
    for (int i = 0; i < vec.size(); i++) {
      if (cnt[vec[i]] >= 4) {
        ans1 = i;
        ans2 = i;
        break;
      }
      if (cnt[vec[i]] < 2) continue;
      if (!~lst)
        lst = i;
      else {
        long long nu = 4LL * (vec[i] * vec[i] + vec[lst] * vec[lst]);
        long long nd = 1LL * vec[i] * vec[lst];
        if (!down)
          up = nu, down = nd, ans1 = i, ans2 = lst;
        else if (nu * down < nd * up)
          up = nu, down = nd, ans1 = i, ans2 = lst;
        lst = i;
      }
    }
    printf("%d %d %d %d\n", vec[ans2], vec[ans1], vec[ans1], vec[ans2]);
    for (int i = 1; i <= n; i++) cnt[a[i]]--;
  }
}
