#include <iostream>
#include <unordered_map>
using namespace std;
unordered_map<int, int> mp;
int main(){
int n; cin >> n;
for(int i = 0; i < n; i ++ ){
int tmp; scanf("%d", &tmp);
mp[tmp] ++;
cout << mp[tmp] << ' ';
}
return 0;
}