#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int vis[10010];
int main() {
  int n, q, a;
  scanf("%d", &q);
  while (q--) {
    v.clear();
    memset(vis, 0, sizeof vis);
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a);
      vis[a]++;
      if (vis[a] == 2) {
        v.push_back(a);
        vis[a] = 0;
      }
    }
    sort(v.begin(), v.end());
    double sum = 0x3f3f3f3f;
    int x = 0, y = 0;
    for (int i = 1; i < v.size(); i++) {
      int a = v[i] * v[i] + v[i - 1] * v[i - 1], b = v[i] * v[i - 1];
      if (sum > 1.0 * a / b) {
        sum = 1.0 * a / b;
        x = v[i], y = v[i - 1];
      }
    }
    printf("%d %d %d %d\n", x, x, y, y);
  }
  return 0;
}
