#t287. 潜在朋友

潜在朋友

Potential Friends

Problem Background

Special for beginners, ^_^

Problem Description

"Birds of a feather flock together" — that is the phrase we like to use when describing friends. Two people being friends usually means they share many common interests. However, as a homebody at Peking University, you find you do not get many chances to know others. Luckily, you unexpectedly obtained the library borrowing records of Peking University, so you stayed up all night programming, hoping to discover potential friends from them.

First you organized the borrowing records: you numbered the NN readers in order as 1,2,…,N1, 2, \dots, N, and the MM books as 1,2,…,M1, 2, \dots, M. Following the principle of "birds of a feather", anyone who likes the same book as you do is your potential friend. Your task now is to compute, from this borrowing record, how many potential friends each person has.

Input Format

The first line contains two integers N,MN, M (2≤N,M≤2002 \le N, M \le 200).

The following NN lines: the ii-th line (i=1,2,…,Ni = 1, 2, \dots, N) contains one number, the ID PP (1≤P≤M1 \le P \le M) of reader ii's favourite book.

Output Format

NN lines in total, one number per line. The ii-th line is the number of potential friends reader ii has.

If reader ii shares a favourite book with nobody, output BeiJu (a tragedy, ^ ^).

Sample Input

4 5
2
3
2
1

Sample Output

1
BeiJu
1
BeiJu

Constraints

Time limit: 1s, memory limit: 1024KiB for each test case.