n = int(input())
s = input()

a = s.count('.')
b = 0

ans = a
print(ans)

for i in range(n):
    if s[i] == '#':
        b += 1
    else:
        a -= 1
    print(a+b)
    ans = min(ans,a+b)

print(ans)
