#include <bits/stdc++.h>
using namespace std;
int T;
signed main() {
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    bool f = false;
    for (int i = 1; i < n; i++)
      if (s[i] != s[i - 1]) {
        f = true;
        cout << i << ' ' << i + 1 << '\n';
        break;
      }
    if (!f) puts("-1 -1");
  }
  return 0;
}
