#CCBCHBAHAI0000169. Đếm chữ số 0..9 (Count Digits 0..9)

    ID: 1087 Loại: Thông thường 2000ms 256MiB Tried: 0 Đã chấp nhận: 0 Độ khó: 1 Đăng bởi: Nhãn>Programming language basicsStatic arraysIteration techniquesImplementation techniquesInteger arithmetic

Đếm chữ số 0..9 (Count Digits 0..9)

Count Digits 0..9

Source: The C Programming Language

Version: Phuoc Hung OJ Extended

Problem

Given nn digits d0,…,dn−1d_0,\ldots,d_{n-1}, each in {0,1,…,9}\{0,1,\ldots,9\}. For every digit vv, let fvf_v be its number of occurrences. Print f0,f1,…,f9f_0,f_1,\ldots,f_9.

Input

  • Line 1: integer nn.
  • Line 2: nn digits.

Output

Print ten integers f0,f1,…,f9f_0,f_1,\ldots,f_9 separated by spaces.

Subtask

Subtask 1 (100 points): 1≤n≤1051\le n\le10^5; 0≤di≤90\le d_i\le9.

Example

Input

8
0 2 2 9 0 5 2 9

Output

2 0 3 0 0 1 0 0 0 2

Explanation

Digits 0,2,5,90,2,5,9 occur 2,3,1,22,3,1,2 times respectively; all other frequencies are zero.