#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int t;
  cin >> t;
  for (int j = 1; j <= t; j++) {
    int n;
    cin >> n;
    int a[n + 5];
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    int g = 1, s = 0, b = 0;
    string answer = "g";
    int firstgold = 1;
    int firstsilver = -1;
    int firstbronze = -1;
    for (int i = 2; i <= n; i++) {
      if (a[i] < a[1]) {
        firstsilver = i;
        break;
      }
      answer += "g";
      g++;
    }
    if (firstsilver == -1 || firstsilver >= n / 2) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      continue;
    }
    for (int i = firstsilver; i <= n; i++) {
      if (a[i] < a[firstsilver] && s > g) {
        firstbronze = i;
        break;
      }
      answer += "s";
      s++;
    }
    if (firstbronze == -1 || firstbronze > n / 2) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      continue;
    }
    if (a[firstbronze] == a[firstbronze + 1]) {
      for (int i = firstbronze; i <= n; i++) {
        if (a[i] < a[firstbronze]) {
          firstbronze = i;
          break;
        }
        s++;
      }
    }
    if (firstbronze > n / 2) {
      cout << 0 << " " << 0 << " " << 0 << endl;
      continue;
    }
    for (int i = firstbronze; i <= n / 2; i++) {
      answer += "b";
      b++;
    }
    if (a[n / 2] == a[n / 2 + 1]) {
      for (int i = n / 2; i >= firstbronze; i--) {
        if (a[i] == a[n / 2])
          b--;
        else
          break;
      }
    }
    if (g < min(b, s))
      cout << g << " " << s << " " << b << endl;
    else
      cout << 0 << " " << 0 << " " << 0 << endl;
  }
}
