#!/bin/python3 import sys n = int(input().strip()) types = list(map(int, input().strip().split(' '))) # your code goes here counts = [0,0,0,0,0,0] for i in types: counts[i]+=1; print(counts.index(max(counts)))