Problem:


Score : 400 points

Problem Statement

Let \mathrm{popcount}(n) be the number of 1s in the binary representation of n.
For example, \mathrm{popcount}(3) = 2, \mathrm{popcount}(7) = 3, and \mathrm{popcount}(0) = 0.

Let f(n) be the number of times the following operation will be done when we repeat it until n becomes 0: "replace n with the remainder when n is divided by \mathrm{popcount}(n)." (It can be proved that, under the constraints of this problem, n always becomes 0 after a finite number of operations.)

For example, when n=7, it becomes 0 after two operations, as follows:

\mathrm{popcount}(7)=3, so we divide 7 by 3 and replace it with the remainder, 1.

\mathrm{popcount}(1)=1, so we divide 1 by 1 and replace it with the remainder, 0.

You are given an integer X with N digits in binary.
For each integer i such that 1 \leq i \leq N, let X_i be what X becomes when the i-th bit from the top is inverted.
Find f(X_1), f(X_2), \ldots, f(X_N).

Constraints

1 \leq N \leq 2 \times 10^5

X is an integer with N digits in binary, possibly with leading zeros.

Input

Input is given from Standard Input in the following format:

N
X

Output

Print N lines. The i-th line should contain the value f(X_i).

Sample Input 1

3
011

Sample Output 1

2
1
1

X_1 = 7, which will change as follows: 7 \rightarrow 1 \rightarrow 0. Thus, f(7) = 2.

X_2 = 1, which will change as follows: 1 \rightarrow 0. Thus, f(1) = 1.

X_3 = 2, which will change as follows: 2 \rightarrow 0. Thus, f(2) = 1.

Sample Input 2

23
00110111001011011001110

Sample Output 2

2
1
2
2
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
3



Sample input:
3
011


Sample output:
2
1
1

Submission status: Wrong Answer

Solution code:
N = int(input())
X = input()

x = list(map(int, X))

num = int(X, 2)

popres = [0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 2, 3, 0, 1, 0, 1, 0, 0, 1, 3, 0, 1, 2, 3, 1, 1, 2, 1, 0, 1, 0, 2, 0, 1, 2, 3, 0, 2, 0, 3, 2, 1, 2, 2, 0, 1, 2, 3, 1, 1, 2, 0, 2, 1, 2, 4, 0, 1, 2, 3, 0, 1, 0, 1, 0, 0, 1, 3, 0, 1, 2,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, 2, 5, 0, 5, 6, 9, 8, 1, 2, 6, 0, 0, 1, 3, 3, 5, 0, 2, 2, 3, 4, 6, 0, 1, 2, 7, 0]

def popcount(n):
    nb = str(bin(n))
    xpop = list(map(int, nb[2:]))
    cpop = xpop.count(1)

    return n % cpop



for i in range(N):
    numt = num
    if x[i] == 0:
        numt += 2 ** (N - i - 1)
    else:
        numt -= 2 ** (N - i - 1)

    res = 0
    while numt > 0:
        if numt > 10000:
            numt = popcount(numt)
            res += 1
        else:
            res += popres[numt - 1]
            numt = 0
    print(res)