#include <bits/stdc++.h>
using namespace std;
int t, n;
int sticks[1000010];
int usables[1000010];
int n_usables;
int seen[10010];
long double best;
pair<int, int> best_pair;
inline int min(int a, int b) { return a < b ? a : b; }
long double calc_best(int w, int h) { return pow(w * 2 + h * 2, 2) / (w * h); }
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    memset(seen, 0, sizeof seen);
    best = -1;
    n_usables = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &sticks[i]);
    }
    for (int i = 0; i < n; i++) {
      if (seen[sticks[i]]) {
        usables[n_usables++] = sticks[i];
        seen[sticks[i]] = 0;
      } else {
        seen[sticks[i]] = 1;
      }
    }
    sort(usables, usables + n_usables);
    for (int i = 1; i < n_usables; i++) {
      if (best == -1) {
        best_pair = make_pair(usables[i], usables[i - 1]);
        best = calc_best(usables[i], usables[i - 1]);
      } else {
        double long new_best = calc_best(usables[i], usables[i - 1]);
        if (new_best < best) {
          best_pair = make_pair(usables[i], usables[i - 1]);
          best = new_best;
        }
      }
    }
    printf("%d %d %d %d\n", best_pair.first, best_pair.first, best_pair.second,
           best_pair.second);
  }
  return 0;
}
