#include <bits/stdc++.h>
using namespace std;
const int maxn = 10005;
int num[maxn];
int e[maxn * 100];
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int cnt = 0, res = 0;
    memset(num, 0, sizeof(num));
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      int x;
      scanf("%d", &x);
      num[x]++;
      if (num[x] % 2 == 0 && num[x]) e[cnt++] = x;
    }
    sort(e, e + cnt);
    int a = e[0], b = e[1];
    for (int i = 2; i < cnt; i++) {
      if ((double)b / (double)a > (double)e[i] / (double)e[i - 1]) {
        a = e[i - 1];
        b = e[i];
      }
    }
    printf("%d %d %d %d\n", a, a, b, b);
  }
  return 0;
}
