#include <bits/stdc++.h>
using namespace std;
int ans[10050];
int main() {
  int t, n, a;
  long long qqq, www, eee;
  qqq = 1, www = 1, eee = 1;
  cin >> t;
  map<int, int> mp;
  map<int, int>::iterator it;
  while (t--) {
    mp.clear();
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a);
      mp[a]++;
    }
    qqq *= 2;
    www *= 2;
    qqq /= 2;
    www /= 2;
    int p = 0, sur = 0;
    for (it = mp.begin(); it != mp.end(); it++) {
      if (it->second >= 4) {
        int u = it->first;
        printf("%d %d %d %d\n", u, u, u, u);
        p = 1;
        break;
      }
      if (it->second >= 2) ans[sur++] = it->first;
    }
    if (p != 0) continue;
    int x = ans[0], y = ans[1];
    for (int i = 2; i < sur; i++) {
      if (ans[i - 1] * y > ans[i] * x) {
        x = ans[i - 1];
        y = ans[i];
      }
    }
    printf("%d %d %d %d\n", x, y, y, x);
  }
  return 0;
}
