#include <bits/stdc++.h>
using namespace std;
const long double EPS = 10e-9;
const int INF = 1e9 + 5;
const long long INFLL = (long long)INF * (long long)INF;
const long long MOD = 1e9 + 7;
const long double PI = 3.14159265358979323846;
struct HASH {
  size_t operator()(const pair<int, int>& x) const {
    return hash<long long>()(((long long)x.first) ^
                             (((long long)x.second) << 32));
  }
};
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = 0; i < (int)v.size(); ++i) {
    os << v[i];
    if (i != (int)v.size() - 1) os << ", ";
  }
  os << "]\n";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  os << "{";
  for (const auto& it : v) {
    os << it;
    if (it != *v.rbegin()) os << ", ";
  }
  os << "}\n";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const unordered_set<T>& v) {
  os << "{";
  for (const auto& it : v) {
    os << it;
    os << ", ";
  }
  os << "}\n";
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const map<T, S>& v) {
  os << "{";
  for (const auto& it : v) {
    os << it.first << " : " << it.second;
    if (it != *v.rbegin()) os << ", ";
  }
  os << "}\n";
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const unordered_map<T, S>& v) {
  os << "{";
  for (const auto& it : v) {
    os << it.first << " : " << it.second;
    os << ", ";
  }
  os << "}\n";
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  os << "(";
  os << v.first << ", " << v.second << ")";
  os << "\n";
  return os;
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
struct Offset {
  set<long long> s;
  long long delta;
  long long getMinimum() { return (*s.begin()) + delta; }
  long long getMaximum() { return (*s.rbegin()) + delta; }
  void increase(long long x) { delta += x; }
  void add(long long x) { s.insert(x - delta); }
  void remove(long long x) { s.erase(x - delta); }
  bool contains(long long x) { return s.count(x - delta) != 0; }
};
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> cnts;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnts[a[i]]++;
  }
  vector<int> o;
  for (auto& p : cnts) {
    if (p.second == 1) {
      continue;
    }
    if (p.second >= 4) {
      for (int i = 0; i < 4; i++) {
        cout << p.first << " ";
      }
      cout << "\n";
      return;
    }
    o.push_back(p.first);
  }
  sort((o).begin(), (o).end());
  int ind = -1;
  double min_val = INT64_MAX;
  for (int i = 1; i < o.size(); i++) {
    double nom = 4 * (o[i] + o[i - 1]) * (o[i] + o[i - 1]);
    double den = o[i] * o[i - 1];
    double val = nom / den;
    if (val < min_val) {
      min_val = val;
      ind = i;
    }
  }
  cout << o[ind - 1] << " " << o[ind - 1] << " " << o[ind] << " " << o[ind]
       << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
