#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n;
    vector<int> v1;
    cin >> n;
    long long int a[n];
    for (int j = 0; j < n; ++j) {
      cin >> a[j];
    }
    for (int j = 0; j < n - 1; ++j)
      if (a[j] > a[j + 1]) v1.push_back(j);
    if (v1.size() >= 2) {
      if (v1.size() > 2) {
        int x = v1.size();
        for (int j = 0; j < v1.size(); ++j) {
          if (v1[j] - v1[0] + 1 > n / 2) {
            x = j;
            break;
          }
        }
        if ((v1[1] - v1[0] > 1 && v1[x - 1] - v1[1] > 1) ||
            (v1[x - 1] - v1[2] > 1)) {
          if (v1[1] - v1[0] > 1 && v1[x - 1] - v1[1] > 1) {
            cout << "1 " << v1[1] - v1[0] << " " << v1[x - 1] - v1[1] << "\n";
          } else {
            cout << "1 " << v1[2] - v1[0] << " " << v1[x - 1] - v1[2] << "\n";
          }
        } else
          cout << "0 0 0\n";
      } else {
        if (n - v1[0] < n / 2 && v1[1] - v1[0] > 1 && n - 1 - v1[1] > 1)
          cout << "1 " << v1[1] - v1[0] << " " << n - v1[1] - 1 << "\n";
        else {
          if (n - v1[1] + 2 < n / 2 && v1[1] - v1[0] > 1 && n - 1 - v1[1] > 1)
            cout << "1 "
                 << "2 " << n - v1[1] - 1 << "\n";
          else
            cout << "0 0 0\n";
        }
      }
    } else
      cout << "0 0 0\n";
  }
}
