#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double eps = 1e-12;
int len[1000050];
int cnt[1000050];
int hsh[1000050];
int main(void) {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &len[i]);
    }
    sort(len + 1, len + 1 + n);
    int tot = 0, ct = 0;
    len[0] = -1;
    for (int i = 1; i <= n; i++) {
      if (len[i] != len[i - 1]) {
        if (ct >= 2) {
          hsh[++tot] = len[i - 1];
          cnt[tot] = ct;
        }
        ct = 1;
      } else {
        ct++;
      }
    }
    if (ct >= 2) {
      hsh[++tot] = len[n];
      cnt[tot] = ct;
    }
    double mn = 400000.0;
    int flag = -1;
    int flag2 = 0;
    for (int i = 2; i <= tot; i++) {
      if (cnt[i] >= 4) {
        mn = 16.0;
        flag2 = 1;
        flag = i;
        break;
      }
      double p = (hsh[i] + hsh[i - 1]) * 2.0;
      double s = hsh[i] * hsh[i - 1];
      if (p * p / s + eps < mn) {
        mn = p * p / s;
        flag = i;
      }
    }
    if (cnt[1] >= 4) {
      mn = 16.0;
      flag2 = 1;
      flag = 1;
    }
    if (!flag2)
      printf("%d %d %d %d\n", hsh[flag - 1], hsh[flag - 1], hsh[flag],
             hsh[flag]);
    else {
      printf("%d %d %d %d\n", hsh[flag], hsh[flag], hsh[flag], hsh[flag]);
    }
  }
  return 0;
}
