You are given a binary string S. In a single operation, you can choose two indices L and R such that 1 ≤ L ≤ R ≤ N and complement the characters between L and R i.e SL, SL+1, …, SR. By complement, we mean change character 0 to 1 and vice-versa.
You task is to perform ATMOST one operation such that in final string number of 1s is maximised. If there is no need to completement, i.e., string contains all 1s, return -1. Else, return the two values denoting L and R. If there are multiple solutions, return the lexicographically smallest pair of L and R.
The first line of input contains an integer T denoting the number of test cases.
Each test case consist of a length of string N and the next line contains the string S in 'lowercase' only.
Print the value L and R with space between then in a seprate line if it exists else print -1.
1 ≤ T ≤ 40
1 ≤ N ≤ 100
1 ≤ |s| ≤ 100
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.