思路:把每次出现的棋局存进一个新列表,判断当前棋局在新列表中出现的次数
n = int(input())
chess1 = [] #存放所有的棋局
chess3 = [] #存放每盘棋局出现的次数
for z in range(n):
chess2 = list([i for i in input()] for j in range(8)) #输入棋局
chess1.append(chess2) #把输入的棋局存放进chess1中
temp = chess1.count(chess2) #计算当前输入的棋局在chess1这个总棋局中出现过多少次
chess3.append(temp)
for i in chess3:
print(i) #输出棋局出现的次数