For this Question: Given an integer N and a string S of length (N-1) containing only characters '0' and '1'. Find an array Arr which contains N integers, such that:
> All the values of the array are distinct
> Maximum value of the array can be N
> For i from 1 to N-1 
 if S[i] == '0'
 Arr[i] > Arr[i+1]
 if S[i] == '1'
 Arr[i] < Arr[i+1]
> Arr is lexographically maximum possible

Note:- It can be proven that it will always be possible to create an array Arr satisfying above conditions.First line of input contains a single integer N.
Second line of input contains the string S of length N-1.

Constraints
2 <= N <= 100000
|S| = (N-1)
S contains characters '0' and '1' only.Print N space separated integers, denoting the array Arr.Sample Input 1
5
0001

Sample Output 1
5 4 3 1 2

Explanation
as S[1] == 0, A[1] > A[2]
as S[2] == 0, A[2] > A[3]
as S[3] == 0, A[3] > A[4]
as S[4] == 1, A[4] < A[5]
this is lexographically maximum array possible.

Sample Input 2
6
11100
Sample Output 2
3 4 5 6 2 1, I have written this Solution Code: k = int(input())
s = input()
left = 1
right = k
n = len(s)
c = 0
for i in range(n):
	if s[i] == '0':
		if c == 0:
			print(right, end = " ")
			right -= 1
		else:
			ans = ""
			for j in range(c+1):
				ans = str(right) + " " + ans
				right -= 1
			print(ans, end = "")
			c = 0
	else:
		c += 1
ans = ""
for j in range(c+1):
	ans = str(right) + " " + ans
	right -= 1
print(ans, end = ""), In this Programming Language: Python, Now tell me if this Code is compilable or not?