1、门禁系统
n = int(input());
list1 = list(map(int,input().split()));
list2 = sorted(set(list1));
dictionary = {};
for i in list2:
dictionary[i] = 0;
for i in list1:
if(i in dictionary):
dictionary[i] = dictionary[i] + 1;
print(dictionary[i],end=' ');
#给出读者的来访记录,请问每一条记录中的读者是第几次出现。
def st141201():
n = int(input())
numbers=list(map(int, input().split()))
times={}
for number in numbers:
if number in times:
times[number]+=1
print(times[number], end=' ')
else: #如果是第一次出现,则先记录
print(1, end=' ')
times[number]=1
if __name__ == '__main__':
st141201()