#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int n, nm[1000006];
vector<int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      if (nm[x] == 0) v.push_back(x);
      nm[x]++;
    }
    int ans[3] = {0, 0, 0}, md = 0, num = 0, gl = 0, tt = 1;
    for (int i = 0; i < v.size(); i++) {
      int x = v[i];
      if (num + nm[x] <= n / 2 && tt) {
        ans[md] += nm[x];
        num += nm[x];
        if (md == 0) {
          gl += nm[x];
          md++;
        } else {
          if (ans[md] > gl && md < 2) md++;
        }
        nm[x] = 0;
      } else {
        tt = false;
        nm[x] = 0;
      }
    }
    if (ans[0] == 0 || ans[1] == 0 || ans[2] == 0 || ans[0] >= ans[1] ||
        ans[0] >= ans[2])
      cout << 0 << ' ' << 0 << ' ' << 0 << endl;
    else
      cout << ans[0] << ' ' << ans[1] << ' ' << ans[2] << endl;
    v.clear();
  }
}
