#include <bits/stdc++.h>
using namespace std;
long long a[1000000], cnt[1000001], cd, b[1000001];
int main() {
  long long t;
  cin >> t;
  while (t--) {
    cin >> cd;
    for (long long i = 1; i <= cd; i++) {
      cin >> a[i];
      cnt[a[i]] = 0;
    }
    for (long long i = 1; i <= cd; i++) {
      cnt[a[i]]++;
    }
    long long own = 0;
    long long pre = 0;
    long long cd1 = 0;
    for (long long i = 1; i <= cd; i++) {
      if (a[i] != a[i - 1]) {
        own += cnt[a[i]];
        if (own > cd / 2) {
          break;
        }
        cd1++;
        b[cd1] = cnt[a[i]];
      }
    }
    long long sum = 0, t = 0;
    for (long long i = 2; i <= cd1; i++) {
      sum += b[i];
    }
    long long found = 0;
    for (long long i = 2; i <= cd1; i++) {
      t += b[i];
      if (t >= sum / 2) {
        if (sum - t < b[1]) {
          cout << 0 << " " << 0 << " " << 0 << '\n';
          found = 1;
        } else {
          cout << b[1] << " " << t << " " << sum - t << '\n';
          found = 1;
          break;
        }
      }
    }
    if (found == 0) cout << 0 << " " << 0 << " " << 0 << '\n';
  }
}
