#include <bits/stdc++.h>
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, cnt = 1;
  cin >> t;
  while (t--) {
    unordered_map<int, int, custom_hash> m;
    set<int> s;
    vector<int> v, v2;
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    if (n <= 9) {
      cout << "0 0 0" << '\n';
      continue;
    }
    long long n2 = (n / 2) - 1, el = -1;
    if (arr[n2] == arr[n2 + 1]) {
      el = arr[n2];
    }
    long long fel = arr[0], fc = 0;
    for (int i = 0; i < n2 + 1; i++) {
      if (arr[i] == fel) fc++;
      if (arr[i] == el) break;
      if (arr[i] != fel) {
        v.push_back(arr[i]);
        m[arr[i]]++;
        s.insert(arr[i]);
      }
    }
    for (int a : s) v2.push_back(a);
    reverse(v2.begin(), v2.end());
    if (s.size() < 2 || (s.size() == 2 && (m[v2[0]] == 1 || m[v2[1]] == 1)))
      cout << "0 0 0" << '\n';
    else if (s.size() == 3) {
      if (v.size() == 3)
        cout << "0 0 0" << '\n';
      else if ((m[v2[0]] + m[v2[1]] >= 2 && m[v2[2]] >= 2) ||
               (m[v2[1]] + m[v2[2]] >= 2 && m[v2[0]] >= 2)) {
        goto here;
      } else
        cout << "0 0 0" << '\n';
    } else {
    here:;
      long long n3 = ((v.size()) / 2) - 1, l = (v.size()) / 2, r = v.size() - l,
                c = 0;
      for (int i = n3; i >= 0; i--) {
        if (v[i] == v[n3])
          c++;
        else
          break;
      }
      l -= c, r -= (m[arr[n3]] - c);
      long long g = min(fc, max(l, r)), s, b;
      if (l > r)
        s = l, b = r + m[arr[n3]];
      else
        s = l + m[arr[n3]], b = r;
      cout << g << " " << s << " " << b << '\n';
    }
  }
  return 0;
}
