// // Created by yang on 2023/5/23. // #include "cstdio" using namespace std; int main(){ int N, M, books[201] = {0}; books[0] = -1; scanf("%d %d", &N, &M); int readers[N]; for (int i = 1; i <= N; ++i) { scanf("%d", &readers[i]); books[readers[i]]++; } for (int i = 1; i <= N; ++i) { int friends_num = books[readers[i]] - 1; if (friends_num == 0) { printf("BeiJu\n"); } else { printf("%d\n", friends_num); } } return 0; }