#include <stdio.h> int main() { int m, n; int cnt[201] = {0}; while (scanf("%d %d", &n, &m) != EOF) { int a[n]; for (int i = 0; i < n; i++) { int temp; scanf("%d", &temp); a[i] = temp; cnt[temp]++; } for (int i = 0; i < n; i++) { int temp = cnt[a[i]] - 1; if (temp > 0) { printf("%d\n", temp); } else if (temp == 0) { printf("BeiJu\n"); } } } return 0; }