n = int(input())
s = input().rstrip()

count = 0

result1 = s.count('#')
result2 = s.count('.')


for x in s:
    count += 1
    if x != '.':
        break
    
    
result3 = s[count:].count('.')
result4 = s[count:].count('#') + 1


sorted(s,reverse = True)
count = 0

for x in s:
    count += 1
    if x != '#':
        break
    
result5 = s[count:].count('#')
result6 = s[count:].count('.') + 1
print(result1,result2,result3,result4,result5,result6)