#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 100;
const int MX = 1000503;
int N, M, k;
int arr[MX];
int cnt[MX];
long double get(int a, int b) {
  double ret = (a + b) * (a + b);
  ret *= 4.0;
  ret /= (double)a;
  ret /= (double)b;
  return ret;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &N);
    for (int i = 1; i <= N; i++) {
      scanf("%d", &arr[i]);
    }
    vector<int> v;
    sort(arr + 1, arr + 1 + N);
    for (int i = 1; i <= N - 1; i++) {
      if (arr[i] == arr[i + 1]) v.push_back(arr[i++]);
    }
    int a, b;
    long double r = 1e12;
    for (int i = 0; i < v.size(); i++) {
      if (i && get(v[i], v[i - 1]) < r) {
        r = get(v[i], v[i - 1]);
        a = v[i];
        b = v[i - 1];
      }
      if (i < v.size() - 1 && get(v[i], v[i + 1]) < r) {
        r = get(v[i], v[i + 1]);
        a = v[i];
        b = v[i + 1];
      }
    }
    cout << a << ' ' << a << " " << b << " " << b << "\n";
  }
  return 0;
}
