#include <bits/stdc++.h>
using namespace std;
int a[400005], freq[1000005];
vector<int> v;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    v.clear();
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      v.push_back(a[i]);
      freq[a[i]]++;
    }
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    reverse(v.begin(), v.end());
    int g = 0, s = 0, b = 0;
    int j = 0;
    for (int i = j; i < v.size(); i++) {
      int x = v[i];
      g += freq[x];
      j = i + 1;
      break;
    }
    for (int i = j; i < v.size(); i++) {
      int x = v[i];
      s += freq[x];
      j = i + 1;
      if (s > g) break;
    }
    for (int i = j; i < v.size(); i++) {
      int x = v[i];
      if ((g + s + b + freq[x]) * 2 > n) break;
      b += freq[x];
      j = i + 1;
    }
    if (g == 0 || s == 0 || b == 0 || (g + s + b) * 2 > n || g >= s || g >= b)
      printf("0 0 0 \n");
    else
      printf("%d %d %d\n", g, s, b);
    for (int i = 1; i <= n; i++) freq[a[i]] = 0;
  }
}
