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.util.*;
  
  import java.io.BufferedReader;
  import java.io.FileNotFoundException;
  import java.io.FileReader;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.io.PrintWriter;
  
  public class FirstSession {
  //	static int min = Integer.MAX_VALUE;
  //	static int c = 0;
  	static int dX[] = { -1, 0, +1, 0 }; // directions
  	static int dY[] = { 0, +1, 0, -1 }; // directions
  	static int n;
  	static int m;
  	static int k;
  //	static int mod = (int) (1e9 + 7);
  //	static int N = (int) 1e7 + 1;
  //	static int[] a = new int[N];
  //	static int[] isPrime = new int[N];
  //	static int[] cntPrime = new int[N];
  //	static int[][] arr = new int[11][N];
  //	static int cnt = 0;
  //	static int flag[] = new int[N];
  	// sieve
  
  	public static void main(String[] args) throws Exception {
  		Scanner sc = new Scanner(System.in);
  		int t = sc.nextInt();
  		while (t-- > 0) {
  			int n = sc.nextInt();
  			String s = sc.next();
  			boolean flag = false;
  			for (int i = 0; i < s.length(); i++) {
  				if (s.charAt(i) == '0') {
  					flag = true;
  					if (i >= n / 2) {
  						System.out.println(1 + " " + (i + 1) + " " + 1 + " " + i);
  						break;
  					} else {
  						System.out.println((i + 1) + " " + n + " " + (i + 2) + " " + n);
  						break;
  					}
  				}
  
  			}
  			if (!flag) {
  				System.out.println(1 + " " + (n - 1) + " " + 2 + " " + n);
  			}
  		}
  
  	}
  
  //	public static void sieve() {
  //		cnt = 0;
  //		for (int i = 1; i < N; i++) {
  //			cntPrime[i] = 0;
  //		}
  //		for (int i = 2; i < N; i++) {
  //			for (int j = i + i; j < N; j += i) {
  //
  //				cntPrime[j]++;
  //				flag[j]++;
  //			}
  //
  //		}
  //		flag[1] = 1;
  //		for (int i = 2; i < flag.length; i++) {
  //			flag[i] += 2;
  //		}
  //		Arrays.sort(flag);
  //	}
  //
  //	public static void sievePrime() {
  //		for (int i = 0; i < N; i++) {
  //			isPrime[i] = 1;
  //		}
  //		isPrime[1] = 0;
  //		isPrime[0] = 0;
  //		for (int i = 2; i < N; i++) {
  //			if (isPrime[i] == 1) {
  //				for (long j = (long) i * i; j < N; j += i) {
  //					isPrime[(int) j] = 0;
  //
  //				}
  //			}
  //		}
  //	}
  
  	public static boolean isValid(int nwR, int nwC, char grid[][]) {
  		return 1 <= nwR && nwR <= n && 1 <= nwC && nwC <= m && grid[nwR][nwC] == '.';
  
  	}
  
  	public static void dfs(int cR, int cC, boolean[][] visited, char grid[][]) {
  		visited[cR][cC] = true;
  //		System.out.println(color[cR][cC]);
  		for (int d = 0; d < 4; d++) {
  			int nwR = cR + dX[d]; // 2
  			int nwC = cC + dY[d];// 1
  
  			if (isValid(nwR, nwC, grid) && !visited[nwR][nwC]) {
  				dfs(nwR, nwC, visited, grid);
  
  			}
  
  		}
  		if (k > 0) {
  			grid[cR][cC] = 'X';
  			k--;
  
  		} else
  			return;
  
  	}
  
  //	public static long power(int base, int expo) {
  //		if (expo == 0)
  //			return 1;
  //		if (expo == 1)
  //			return base;
  //		if ((expo & 1) != 0) { // meaning of odd
  //			return (((long) (base * power(base, expo - 1)))) % mod;
  //
  //		} else {
  //			long result = power(base, expo / 2);
  //			return (result * result) % mod;
  //		}
  //
  //	}
  
  	/**
  	 *
  	 * Fixed Window Find the max sum subarray of a fixed size K
  	 *
  	 * Example input: [4, 2, 1, 7, 8, 1, 2, 8, 1, 0]
  	 *
  	 */
  	public static int findMaxSumSubarray(int[] arr, int k) {
  		int maxValue = Integer.MIN_VALUE;
  		int currentRunningSum = 0;
  		for (int i = 0; i < arr.length; i++) {
  			currentRunningSum += arr[i];
  			if (i >= k - 1) {
  				maxValue = Math.max(maxValue, currentRunningSum);
  				currentRunningSum -= arr[i - (k - 1)]; // Akher element fl 3 bto3 el K
  			}
  		}
  		return maxValue;
  	}
  
  	// Dynamic Window
  	public static int smallestSubarray(int targetSum, int[] arr) {
  		int minWindowSize = Integer.MAX_VALUE;
  		int currentWindowSum = 0;
  		int windowStart = 0;
  		for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {
  			currentWindowSum += arr[windowEnd];
  			while (currentWindowSum >= targetSum) {
  				minWindowSize = Math.min(minWindowSize, windowEnd - windowStart + 1);
  				currentWindowSum -= arr[windowStart];
  				windowStart++;
  			}
  		}
  		return minWindowSize;
  	}
  
  	public static boolean isPowerOfTwo(long n) {
  		if (n == 0)
  			return false;
  
  		return (int) (Math.ceil((Math.log(n) / Math.log(2)))) == (int) (Math.floor(((Math.log(n) / Math.log(2)))));
  	}
  
  	static boolean check(Long mid, int[] a, int[] b, int x[], Long Ruples) {
  //		System.out.println(Arrays.toString(x));
  //		System.out.println(Arrays.toString(a));
  
  		for (int i = 0; i < 3; i++) {
  			if (mid * x[i] > a[i]) {
  				Long temp = (mid * x[i] - a[i]) * b[i];
  
  				if (Ruples < temp)
  					return false;
  
  				else
  					Ruples -= temp;
  
  			}
  
  		}
  		return true;
  
  	}
  
  	// better solution for less steps
  //	public static int dfs(int node) {
  //	 visited[node] = true;
  //	 int c = 1;
  //	 for (int i : adjList[node]) {
  //	 if (!visited[i]) {
  //	 c += dfs(i);
  //	 }
  //	 }
  //	 return c;
  //	 Getting last occur of element
  //
  //	public static int binarySearch(int low, int n, int high) {
  //		low = 0;
  //		high = n - 1;
  //		while (low <= high) {
  //			int mid = (low + high) / 2;
  //			if (x >= a[mid]) {
  //				if (x == a[mid]) {
  //					ans = mid;
  //				}
  //				low = mid + 1;
  //
  //			} else if (a[mid] > x) {
  //				high = mid - 1;
  //			}
  //		}
  //
  //	}
  	public static int gcdFast(int x, int y) {
  		if (y == 0) {
  			return x;
  		} else {
  			return gcdFast(y, x % y);
  		}
  	}
  
  	static class Pair implements Comparable<Pair> {
  		int a, b;
  
  		public Pair(int a, int b) {
  			this.a = a;
  			this.b = b;
  		}
  
  		public int compareTo(Pair A) {
  			return this.a > A.a ? 1 : -1; // sorting ascending
  		}
  
  		public String toString() {
  			return a + " " + b;
  		}
  
  		public boolean isEqual(Pair y) {
  			return a == y.a && b == y.b;
  		}
  	}
  
  	public static int findLength(String str, int k) {
  		int windowStart = 0, maxLength = -1;
  		HashMap<Character, Integer> hs = new HashMap<Character, Integer>();
  		for (int windowEnd = 0; windowEnd < str.length(); windowEnd++) {
  			char rightChar = str.charAt(windowEnd);
  			hs.put(rightChar, hs.getOrDefault(rightChar, 0) + 1); // Increasing its value by 1 and if it have no value
  			// just its zero and add 1
  			while (hs.size() > k) {
  				char leftChar = str.charAt(windowStart);
  				hs.put(leftChar, hs.get(leftChar) - 1);
  				if (hs.get(leftChar) == 0) {
  					hs.remove(leftChar);
  				}
  				windowStart++;
  			}
  			maxLength = Math.max(maxLength, windowEnd - windowStart + 1);
  		}
  		return maxLength;
  	}
  
  	static class Scanner {
  		StringTokenizer st;
  		BufferedReader br;
  
  		public Scanner(InputStream s) {
  			br = new BufferedReader(new InputStreamReader(s));
  		}
  
  		public Scanner(String file) throws FileNotFoundException {
  			br = new BufferedReader(new FileReader(file));
  		}
  
  		public String next() throws IOException {
  			while (st == null || !st.hasMoreTokens())
  				st = new StringTokenizer(br.readLine());
  			return st.nextToken();
  		}
  
  		public int nextInt() throws IOException {
  			return Integer.parseInt(next());
  		}
  
  		public long nextLong() throws IOException {
  			return Long.parseLong(next());
  		}
  
  		public String nextLine() throws IOException {
  			return br.readLine();
  		}
  
  		public double nextDouble() throws IOException {
  			return Double.parseDouble(next());
  		}
  
  		public boolean ready() throws IOException {
  			return br.ready();
  		}
  
  		public int[] nextArr(int n) throws IOException {
  			int arr[] = new int[n];
  			for (int i = 0; i < n; i++)
  				arr[i] = nextInt();
  			return arr;
  		}
  	}
  }
  