#includeusing namespace std; using gg = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); gg ni, ai; cin >> ni; unordered_map um; while (ni--) { cin >> ai; cout << ++um[ai] << " "; } return 0; }

#includeusing namespace std; using gg = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); gg ni, ai; cin >> ni; unordered_map um; while (ni--) { cin >> ai; cout << ++um[ai] << " "; } return 0; }