#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, ans_l = 0, ans_r = 0, flog = 0;
    string str;
    cin >> n;
    cin >> str;
    for (int i = 1; i < n; ++i) {
      if (str[i - 1] != str[i]) {
        cout << i << " " << i + 1 << endl;
        flog = 1;
        break;
      }
    }
    if (!flog) {
      cout << "-1"
           << " "
           << "-1" << endl;
    }
  }
  return 0;
}
