A string
Constraints
Subtask 1 [10%]
Subtask 2 [20%]
Subtask 3 [20%]
Subtask 4 [50%]
Input Specification
The first line contains a single integer
The next line contains the string
Output Specification
Output
Sample Input 1
Copy
3
ccc
Sample Output 1
Copy
0
27
8
1
Sample Input 2
Copy
4
dmpg
Sample Output 2
Copy
70
16
9
4
1
Comments