#include <bits/stdc++.h>
using namespace std;
const int N = 1000000, INF = 0x3f3f3f3f;
int aa[N], qu[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> aa[i];
    sort(aa, aa + n);
    int s = -1;
    for (int i = 0; i + 3 < n; i++)
      if (aa[i + 1] == aa[i] && aa[i + 2] == aa[i] && aa[i + 3] == aa[i]) {
        s = aa[i];
        break;
      }
    if (s != -1) {
      cout << s << ' ' << s << ' ' << s << ' ' << s << '\n';
      continue;
    }
    int cnt = 0;
    for (int i = 0; i + 1 < n; i++)
      if (aa[i] == aa[i + 1] && (i == 0 || aa[i] != aa[i - 1]))
        qu[cnt++] = aa[i];
    int a_ = -1, b_ = -1, p_ = INF, q_ = 1;
    for (int h = 0; h + 1 < cnt; h++) {
      int a = qu[h], b = qu[h + 1];
      int p = b - a, q = a;
      if ((long long)p_ * q > (long long)p * q_) {
        a_ = a, b_ = b;
        p_ = p, q_ = q;
      }
    }
    cout << a_ << ' ' << a_ << ' ' << b_ << ' ' << b_ << '\n';
  }
  return 0;
}
