#include <bits/stdc++.h>
using namespace std;
long long ar[3000000 + 9];
int main() {
  long long i, j, k, l, n, m, tot, temp, curr, val, prev, a, b, c, t, ans, cnt,
      x, y, siz, ii, jj, xx, yy, root, ind, len, q, xxx, yyy, d, r, no_per_blk;
  cin >> t;
  while (t--) {
    cin >> n;
    for (i = 1; i <= n; i++) scanf("%lld", &ar[i]);
    sort(ar + 1, ar + 1 + n);
    reverse(ar + 1, ar + 1 + n);
    ar[n + 1] = 0;
    for (i = 1; i <= n / 2; i++)
      if (ar[i] != ar[i + 1]) len = i;
    ans = 0;
    a = 0;
    b = 0;
    c = 0;
    x = 0;
    for (i = 1; i <= n; i++) {
      if (ar[i] == ar[i + 1]) continue;
      x = max(x, i + 1);
      for (j = x; j <= n; j++) {
        x = j;
        if (ar[j] == ar[j + 1]) continue;
        xx = j - i;
        yy = len - j;
        if (xx <= i) continue;
        if (yy <= i) continue;
        if (i + xx + yy > ans) {
          ans = i + xx + yy;
          a = i;
          b = xx;
          c = yy;
        }
        break;
      }
    }
    cout << a << " " << b << " " << c << endl;
  }
}
