#include <bits/stdc++.h>
using namespace std;
int vis[10050];
int flag[10050];
vector<int> v;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    int ans = -1;
    memset(vis, 0, sizeof(vis));
    memset(flag, 0, sizeof(flag));
    v.clear();
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      int a;
      scanf("%d", &a);
      vis[a]++;
      if (vis[a] == 2) {
        v.push_back(a);
        flag[a]++;
        vis[a] = 0;
      }
      if (flag[a] >= 2) {
        ans = a;
      }
    }
    if (ans != -1) {
      printf("%d %d %d %d\n", ans, ans, ans, ans);
      continue;
    }
    sort(v.begin(), v.end());
    double mins = 1e9;
    int mins_num = 0;
    for (int i = 0; i < v.size() - 1; i++) {
      double k = 1.0 * v[i + 1] / v[i];
      if (k < mins) {
        mins_num = i;
        mins = k;
      }
    }
    printf("%d %d %d %d\n", v[mins_num], v[mins_num], v[mins_num + 1],
           v[mins_num + 1]);
  }
  return 0;
}
