#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, n;
  char str[58];
  cin >> t;
  while (t--) {
    cin >> n;
    cin >> str;
    int x = 0;
    for (int i = 0; i < n - 1; i++) {
      if (str[i] != str[i + 1]) {
        printf("%d %d\n", i + 1, i + 2);
        x = 1;
        break;
      }
    }
    if (x == 0) printf("%d %d\n", -1, -1);
  }
  return 0;
}
