#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    vector<int> v;
    cin >> x;
    map<int, int> m;
    for (int j = 0; j < x; j++) {
      int y;
      cin >> y;
      if (!m.count(y)) {
        m[y] = 1;
        v.push_back(y);
      } else
        m[y]++;
    }
    vector<int> ans;
    int cot = 0;
    for (int j = 0; j < v.size(); j++) {
      if (cot + m[v[j]] <= x / 2) {
        ans.push_back(m[v[j]]);
        cot += m[v[j]];
      } else {
        break;
      }
    }
    if (ans.size() < 3)
      cout << "0 0 0";
    else {
      int end = ans.size() - 1;
      while (end > 2) {
        if (ans[1] <= ans[0])
          ans[1] += ans[end];
        else if (ans[2] <= ans[0])
          ans[2] += ans[end];
        else {
          ans[1] += ans[end];
        }
        end--;
      }
      if (ans[1] + ans[2] <= ans[0] * 2)
        cout << "0 0 0";
      else {
        int p = ans[1] + ans[2];
        ans[1] = p / 2;
        ans[2] = p - p / 2;
        cout << ans[0] << " " << ans[1] << " " << ans[2];
      }
    }
    cout << endl;
  }
}
