description: Frodo was caught by Saruman. He tore a pouch from Frodo's neck, shook out its contents —there was a pile of different rings: gold and silver...
  
  "How am I to tell which is the One?!" the mage howled.
  
  "Throw them one by one into the Cracks of Doom and watch when Mordor falls!" 
  
  Somewhere in a parallel Middle-earth, when Saruman caught Frodo, he only found n rings. And the i-th ring was either gold or silver. For convenience Saruman wrote down a binary string s of n characters, where the i-th character was 0 if the i-th ring was gold, and 1 if it was silver.
  
  Saruman has a magic function f, which takes a binary string and returns a number obtained by converting the string into a binary number and then converting the binary number into a decimal number. For example, f(001010) = 10, f(111) = 7, f(11011101) = 221.
  
  Saruman, however, thinks that the order of the rings plays some important role. He wants to find 2 pairs of integers (l_1, r_1), (l_2, r_2), such that:
  
    * 1 ≤ l_1 ≤ n, 1 ≤ r_1 ≤ n, r_1-l_1+1≥ ⌊ n/2 ⌋ 
    * 1 ≤ l_2 ≤ n, 1 ≤ r_2 ≤ n, r_2-l_2+1≥ ⌊ n/2 ⌋ 
    * Pairs (l_1, r_1) and (l_2, r_2) are distinct. That is, at least one of l_1 ≠ l_2 and r_1 ≠ r_2 must hold.
    * Let t be the substring s[l_1:r_1] of s, and w be the substring s[l_2:r_2] of s. Then there exists non-negative integer k, such that f(t) = f(w) ⋅ k.
  
  
  
  Here substring s[l:r] denotes s_ls_{l+1}… s_{r-1}s_r, and ⌊ x ⌋ denotes rounding the number down to the nearest integer.
  
  Help Saruman solve this problem! It is guaranteed that under the constraints of the problem at least one solution exists.
  
  Input
  
  Each test contains multiple test cases.
  
  The first line contains one positive integer t (1 ≤ t ≤ 10^3), denoting the number of test cases. Description of the test cases follows.
  
  The first line of each test case contains one positive integer n (2 ≤ n ≤ 2 ⋅ 10^4) — length of the string.
  
  The second line of each test case contains a non-empty binary string of length n.
  
  It is guaranteed that the sum of n over all test cases does not exceed 10^5.
  
  Output
  
  For every test case print four integers l_1, r_1, l_2, r_2, which denote the beginning of the first substring, the end of the first substring, the beginning of the second substring, and the end of the second substring, respectively.
  
  If there are multiple solutions, print any.
  
  Example
  
  Input
  
  
  7
  6
  101111
  9
  111000111
  8
  10000000
  5
  11011
  6
  001111
  3
  101
  30
  100000000000000100000000000000
  
  
  Output
  
  
  3 6 1 3
  1 9 4 9
  5 8 1 4
  1 5 3 5
  1 6 2 4
  1 2 2 3
  1 15 16 30
  
  Note
  
  In the first testcase f(t) = f(1111) = 15, f(w) = f(101) = 5.
  
  In the second testcase f(t) = f(111000111) = 455, f(w) = f(000111) = 7.
  
  In the third testcase f(t) = f(0000) = 0, f(w) = f(1000) = 8.
  
  In the fourth testcase f(t) = f(11011) = 27, f(w) = f(011) = 3.
  
  In the fifth testcase f(t) = f(001111) = 15, f(w) = f(011) = 3.
solution: 
  import java.io.*;
  import java.util.*;
  
  
  public class codeforces2 {
      static List<Integer> primes;
      public static void main(String[] args) {
          FastScanner sc = new FastScanner();
          PrintWriter pw = new PrintWriter(System.out);
  //        primes = sieveOfEratosthenes(100_000);
  //        System.out.println(primes.toString());
          int tc = sc.ni();
          for (int rep = 0; rep < tc; rep++) {
              int N = sc.ni();
              char[] s = sc.next().toCharArray();
              int idx = -1;
              for (int i = 0; i < s.length; i++) if (s[i] == '0') idx= i;
              if (idx == -1) {
                  pw.println("1 " + (N-1) + " 2 " + N);
                  continue;
                  
              }
              idx++;
              if (idx - 1 + 1 >= N / 2 && idx - 1 - 1+ 1>= N/2) pw.println("1 " + idx + " 1 " + (idx - 1));
              else pw.println(idx + " " + N + " " + (idx + 1) + " " + N);
          }
          pw.close();
      }
      public static long solve(long[] a, long[] b) {
          return 0;
          
             
          
      }
      static boolean isSet(long n, int bit) {
          if (((1 << bit) & n) > 0) return true;
          return false;
      }
      static long nextPrime(long input){
          long counter;
          input++;
          while(true){
            int l = (int) Math.sqrt(input);
            counter = 0;
            for(long i = 2; i <= l; i ++){
              if(input % i == 0)  counter++;
            }
            if(counter == 0)
              return input;
            else{
              input++;
              continue;
            }
          }
        }
      public static List<Integer> sieveOfEratosthenes(int n) {
          boolean prime[] = new boolean[n + 1];
          Arrays.fill(prime, true);
          for (int p = 2; p * p <= n; p++) {
              if (prime[p]) {
                  for (int i = p * 2; i <= n; i += p) {
                      prime[i] = false;
                  }
              }
          }
          List<Integer> primeNumbers = new LinkedList<>();
          for (int i = 2; i <= n; i++) {
              if (prime[i]) {
                  primeNumbers.add(i);
              }
          }
          return primeNumbers;
      }
      public static boolean perfectSquare(long n) {
          long lo = 0;
          long hi = n;
          while (lo < hi) {
              long k = (lo + hi) / 2;
              if (k * k < n)
                  lo = k + 1;
              else
                  hi = k;
          }
          return (lo * lo == n);
      }
      static Set<Integer> divisors(int n) {
          Set<Integer> set = new HashSet();
          for (int i=1; i<=Math.sqrt(n); i++)
          {
              if (n%i==0)
              {
                  // If divisors are equal, print only one
                  if (n/i == i)
                      set.add(i);
        
                  else {// Otherwise print both
                      set.add(i);
                      set.add(n / i);
                  }
              }
          }
          return set;
      }
      static Map<Integer, Integer> primeFactorization(int x) {
          //first divide by 2
          Map<Integer, Integer> map = new HashMap();
          if (x == 0) return map;
          int count = 0;
          while (x % 2 == 0) {
              x /=2;
              count++;
          }
          //insert 2
          if (count > 0) map.put(2, count);
          for (int divisor = 3; divisor * divisor <= x; divisor += 2) {
              int cnt = 0;
              while (x % divisor == 0) {
                  x /= divisor;
                  cnt++;
              }
              if (cnt > 0) map.put(divisor, cnt);
          }
          if (x > 1) {
              map.put(x, 1);
          }
          return map;
      }
      static boolean isPrime(int n)
      {
   
          // Check if number is less than
          // equal to 1
          if (n <= 1)
              return false;
   
          // Check if number is 2
          else if (n == 2)
              return true;
   
          // Check if n is a multiple of 2
          else if (n % 2 == 0)
              return false;
   
          // If not, then just check the odds
          for (int i = 3; i <= Math.sqrt(n); i += 2) 
          {
              if (n % i == 0)
                  return false;
          }
          return true;
      }
      static int gcd(int a, int b)
      {
          if (a == 0)
              return b; 
          return gcd(b % a, a); 
      }
      static long gcd(long a, long b) {
          if (a == 0)
              return b; 
          return gcd(b % a, a); 
      }
       
      // method to return LCM of two numbers
      static int lcm(int a, int b)
      {
          return (a / gcd(a, b)) * b;
      }
      public static void sort(int[] arr) {
          Random rgen = new Random();
          for (int i = 0; i < arr.length; i++) {
              int r = rgen.nextInt(arr.length);
              int temp = arr[i];
              arr[i] = arr[r];
              arr[r] = temp;
          }
          Arrays.sort(arr);
      }
   
      public static void sort(long[] arr) {
          Random rgen = new Random();
          for (int i = 0; i < arr.length; i++) {
              int r = rgen.nextInt(arr.length);
              long temp = arr[i];
              arr[i] = arr[r];
              arr[r] = temp;
          }
          Arrays.sort(arr);
      }
      /* */
      //printing methods
      /* */
      //WOW!
      /* */
      public static void printArr(PrintWriter pw, int[] arr) {
          StringBuilder sb = new StringBuilder();
          for (int x : arr) {
              sb.append(x + "");
          }
          sb.setLength(sb.length() - 1);
          pw.println(sb.toString());
      }
      public static void printArr2d(PrintWriter pw, int[][] arr) {
          StringBuilder sb = new StringBuilder();
          for (int[] row : arr) {
              for (int x : row) {
                  sb.append(x + " ");
              }
              sb.setLength(sb.length() - 1);
              sb.append("\n");
          }
          sb.setLength(sb.length() - 1);
          pw.println(sb.toString());
      }
  }
  class FastScanner {
      BufferedReader br;
      StringTokenizer st;
  
      public FastScanner() {
          br = new BufferedReader(new InputStreamReader(System.in), 32768);
          st = null;
      }
  
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
  
      int ni() {
          return Integer.parseInt(next());
      }
  
      int[] intArray(int N) {
          int[] ret = new int[N];
          for (int i = 0; i < N; i++)
              ret[i] = ni();
          return ret;
      }
  
      long nl() {
          return Long.parseLong(next());
      }
  
      long[] longArray(int N) {
          long[] ret = new long[N];
          for (int i = 0; i < N; i++)
              ret[i] = nl();
          return ret;
      }
  
      double nd() {
          return Double.parseDouble(next());
      }
  
      String nextLine() {
          String str = "";
          try {
              str = br.readLine();
          } catch (IOException e) {
              e.printStackTrace();
          }
          return str;
      }
  }
  class UnionFind {
      int size;
      private int[] id;
      public UnionFind(int size) {
          this.size = size;
          id = new int[size];
          for (int i = 0; i < id.length; i++) {
              id[i] = i;
          }
      }
      public int find(int a) {
          if (id[a] != a) {
              id[a] = find(id[a]);
          }
          return id[a];
      }
      public void union(int a, int b) {
          int r1 = find(a);
          int r2 = find(b);
          if (r1 == r2) return;
          size--;
          id[r1] = r2;
      }
      @Override
      public String toString() {
          return Arrays.toString(id);
      }
  }
  