#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int n, stick[maxn], ans[4], tmp[maxn];
int main() {
  int t, i, j, k, cnt = 0, flag, a, b;
  double aans, tt;
  cin >> t;
  while (t--) {
    cin >> n;
    flag = cnt = 0;
    aans = 1e18;
    for (i = 1; i <= n; i++) scanf("%d", tmp + i);
    sort(tmp + 1, tmp + n + 1);
    for (i = 1; i <= n; i++) {
      if (i >= 4 && tmp[i] == tmp[i - 1] && tmp[i - 1] == tmp[i - 2] &&
          tmp[i - 2] == tmp[i - 3]) {
        flag = 1;
        ans[1] = tmp[i];
        break;
      } else if (i >= 3 && tmp[i] == tmp[i - 1] && tmp[i] != tmp[i - 2] ||
                 i < 3 && tmp[i] == tmp[i - 1])
        stick[++cnt] = tmp[i];
    }
    if (flag) {
      cout << ans[1] << " " << ans[1] << " " << ans[1] << " " << ans[1] << endl;
      continue;
    }
    ans[1] = stick[1];
    ans[2] = stick[2];
    for (i = 3; i <= cnt; i++) {
      if (stick[i] * ans[1] < stick[i - 1] * ans[2]) {
        ans[2] = stick[i];
        ans[1] = stick[i - 1];
      }
    }
    cout << ans[1] << " " << ans[1] << " " << ans[2] << " " << ans[2] << endl;
  }
  return 0;
}
