High security#2377

High security

3 seconds
256 megabytes
Medium

Jason is a system administrator of a new social network named Concord.

High security is very important in social networks. One of the threats is spammers, who can steal users' passwords and send spam messages or perform other malicious actions.

According to Concord's security policy, each password consists of five characters, which can be lowercase or uppercase English letters, or digits. Jason wants to analyze the database of all user passwords to assess its security level. The security level is determined by how many pairs of passwords are the same or differ in one, two, and so on, positions.

Input

The first line of the input file contains one integer — the total number of Concord users (1 \le n \le 50000). Each of the following lines contains a single user password.

Output

The output file should contain six numbers a_i (0 \le i \le 5) — the number of pairs of passwords that differ in exactly positions.

Examples

Example 1

Loading
Loading