#include <iostream> #include <cstdio> #include <string> using namespace std; const int MAX=200; int books[MAX]; int bookNum[MAX]; int main() { int N,M; while(scanf("%d %d",&N,&M)!=EOF){ for(int i=1;i<=M;i++){ books[i]=-1; } for(int i=1;i<=N;i++){ scanf("%d",&bookNum[i]); books[bookNum[i]]++; } for(int i=1;i<=N;i++){ if(books[bookNum[i]]<=0){ printf("BeiJu\n"); }else{ printf("%d\n",books[bookNum[i]]); } } } return 0; } // 64 位输出请用 printf("%lld")