#include <iostream> #include <cstdio> #include <map> using namespace std; const int MAX = 201; /** * 谁是你的潜在朋友--北京大学 * @return */ int main() { int n; int m; int number[MAX]; while (cin >> n >> m) { map<int, int> readerMap; for (int i = 1; i <= n; ++i) { cin >> number[i]; readerMap[number[i]]++; } for (int j = 1; j <= n; ++j) { if (readerMap[number[j]] > 1) { cout << readerMap[number[j]] - 1 << endl; } else { cout << "BeiJu" << endl; } } } return 0; }