#include <bits/stdc++.h>
using namespace std;
ifstream f("test.in");
ofstream g("test.out");
int fr[1000006];
int viz[1000006];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v;
    for (int i = 1; i <= n; i++) {
      int x;
      cin >> x;
      fr[x]++;
      v.push_back(x);
    }
    int g = fr[v[0]], s = 0, b = 0;
    if (3 * g + 2 > n / 2) {
      cout << "0 0 0\n";
      continue;
    }
    n = distance(v.begin(), unique(v.begin(), v.end()));
    v.resize(n);
    vector<int> suma;
    suma.push_back(fr[v[0]]);
    for (int i = 1; i < n; i++) suma.push_back(suma.back() + fr[v[i]]);
    continue;
    int ans[5] = {0};
    ans[1] = 1;
    ans[2] = 2;
    ans[3] = 2;
    for (int i = 1; i < n; i++) {
      s = suma[i] - suma[0];
      int st = i, dr = n - 1;
      while (st <= dr) {
        int mij = (st + dr) >> 1;
        int x = suma[mij] - suma[i - 1];
        if (g + s + x <= n / 2) {
          if (g < s and g < x) {
            ans[1] = g;
            ans[2] = s;
            ans[3] = x;
          }
          st = mij + 1;
        } else
          dr = mij - 1;
      }
    }
    if (ans[1] and ans[2] and ans[3]) {
      cout << ans[1] << ' ' << ans[2] << ' ' << ans[3] << '\n';
    } else
      cout << "0 0 0\n";
    for (int i = 0; i < n; i++) fr[v[i]] = 0;
  }
  return 0;
}
