#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
const int maxm = 1e4 + 5;
int a[maxn], b[maxn];
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    int flag = -1, bb = 0;
    for (int i = 0; i + 1 < n; i++) {
      if (a[i + 1] == a[i]) {
        b[bb++] = a[i];
        if (bb - 2 >= 0 && b[bb - 1] == b[bb - 2]) {
          flag = b[bb - 1];
          break;
        }
        i++;
      }
    }
    if (flag != -1) {
      cout << flag << " " << flag << " " << flag << " " << flag << endl;
      continue;
    }
    double mi = 1e4 + 1;
    int x, y;
    for (int i = 0; i + 1 < bb; i++) {
      if (b[i + 1] * 1.0 / b[i] < mi) {
        mi = b[i + 1] * 1.0 / b[i];
        x = b[i];
        y = b[i + 1];
      }
    }
    cout << x << " " << x << " " << y << " " << y << endl;
  }
}
