High Security

Time limit3sMemory limit256 MB

Problem

Vasya is a system administrator of a new social network called Five Contacts (or simply V Contacts). Security matters a great deal on a social network. One of the biggest threats is spammers, who steal users' passwords and then send spam or cause other harm.

Under the V Contacts security policy, every password is exactly five characters long, and each character is a lowercase English letter, an uppercase English letter, or a digit. Vasya wants to measure how secure the password database is. His metric is based on how similar the passwords are to one another: how many pairs of passwords are identical, how many differ in exactly one position, how many differ in exactly two positions, and so on.

Two passwords are compared position by position. The number of positions in which they differ (their Hamming distance) ranges from $0$ (identical) to $5$ (different in every position). For every distance $i$ from $0$ to $5$, count the number of unordered pairs of passwords whose distance is exactly $i$.

Input

The first line contains one integer $n$ — the number of users of V Contacts ($1 \le n \le 50000$).

Each of the next $n$ lines contains one password: exactly five characters, each a lowercase English letter, an uppercase English letter, or a digit. Passwords are case-sensitive, and the same password may appear more than once.

Output

Print six integers $a_0, a_1, a_2, a_3, a_4, a_5$ on a single line, separated by single spaces. Here $a_i$ is the number of unordered pairs of passwords that differ in exactly $i$ positions. In particular, $a_0$ counts pairs of identical passwords.