#include <bits/stdc++.h>
using namespace std;
int cnt[1000000];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n + 1];
    int g = 0, s = 0, b = 0;
    set<int> st;
    vector<int> v;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      cnt[arr[i]]++;
    }
    arr[n] = -1;
    for (int i = cnt[arr[0]]; i < n; i++) {
      if (arr[i] != arr[i + 1]) v.push_back(arr[i]);
    }
    int temp = n / 2;
    g = cnt[arr[0]];
    temp -= g;
    int sum = 0;
    for (auto u : v) {
      if (sum + cnt[u] <= temp) {
        sum += cnt[u];
      } else
        break;
    }
    int temp2 = 0;
    if (v.size() != 0) {
      for (auto u : v) {
        if (temp2 + cnt[u] <= g)
          temp2 += cnt[u];
        else {
          temp2 += cnt[u];
          break;
        }
      }
    }
    sum -= temp2;
    s = temp2;
    b = sum;
    if (g <= 0 || s <= 0 || b <= 0 || b <= g)
      cout << 0 << " " << 0 << " " << 0 << endl;
    else
      cout << g << " " << s << " " << b << endl;
  }
}
