#include <bits/stdc++.h>
using namespace std;
void printZero() { cout << (int)0 << (int)0 << (int)0 << endl; }
void printGSB(vector<int>& nums) {
  int n = nums.size();
  if (n <= 4) {
    printZero();
    return;
  }
  int beg = nums[0];
  int g = 1;
  for (int i = 1; i < n / 2 && (beg == nums[i]); ++i) {
    ++g;
  }
  if (g > n / 3) {
    printZero();
    return;
  }
  int s = 0;
  while (s <= g) {
    int begs = nums[g + s];
    ++s;
    for (int i = (g + s); (i < n) && (begs == nums[i]); ++i) {
      ++s;
    }
  }
  int bt = (n / 2 - g) - s;
  if (bt <= g) {
    printZero();
    return;
  }
  int b = 0;
  while (b <= g) {
    int begs = nums[g + s + b];
    ++b;
    for (int i = (g + s + b); (i < n) && (begs == nums[i]); ++i) {
      ++b;
    }
  }
  if (nums[bt + 1] == nums[bt]) {
    int bl = bt;
    for (int i = bt; i >= 0 && nums[i] == nums[bt]; --i) {
      --bl;
    }
    if ((bl) <= b) {
      printZero();
      if (bl == b) {
      } else {
      }
    }
    b = bl;
  } else {
    b = bt;
  }
  cout << g << s << b << endl;
  return;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> nums;
    while (n--) {
      int val;
      cin >> val;
      nums.push_back(val);
    }
    printGSB(nums);
  }
  return 0;
}
