#include <cstdio> #define MAXN 0x3ef int cnts[MAXN]; int main() { int num; scanf("%d",&num); for (int i = 0;i < num;++i) { int id; scanf("%d",&id); printf("%d ",++cnts[id]); } }