A Ternary Problem

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Problem type

You are given a ternary string of length N containing only 0s, 1s, and 2s. You must print the occurrence of each digit.

Input Specification

The first line will contain the integer N (1 \le N \le 10^6).

The second line will contain the ternary string containing only 0s, 1s and 2s.

Output Specification

On the first line, print 3 integers. The first integer is the number of 0s, the second is the number of 1s, and the third is the number of 2s.

Sample Input


Sample Output

2 1 2


There are no comments at the moment.