#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000010;
int a[maxn], b[maxn];
bool ok(int pos, int tmp) {
  int a1 = b[pos];
  int b1 = b[pos + 1];
  int a2 = b[tmp];
  int b2 = b[tmp + 1];
  int A = a1 * a1 + b1 * b1;
  int B = a1 * b1;
  int C = a2 * a2 + b2 * b2;
  int D = a2 * b2;
  long long AA = 1LL * A * D;
  long long BB = 1LL * B * C;
  if (AA > BB)
    return true;
  else
    return false;
}
int main() {
  int T;
  scanf("%d", &T);
  for (int cas = 1; cas <= T; cas++) {
    int n, len = 0;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    sort(a + 1, a + n + 1);
    for (int i = 1; i <= n - 1; i++) {
      if (a[i] == a[i + 1]) {
        b[++len] = a[i];
        i++;
      }
    }
    int pos = -1;
    for (int i = 1; i <= len - 1; i++) {
      if (pos == -1 || ok(pos, i)) pos = i;
    }
    printf("%d %d %d %d\n", b[pos], b[pos], b[pos + 1], b[pos + 1]);
  }
  return 0;
}
