7 2 2 1 2 3 2 2
2
import sys
p=sys.stdin.read().strip().split()
if not p: sys.exit(0)
n=int(p[0])
a=list(map(int,p[1:1+n]))
cand=None
cnt=0
for v in a:
if cnt==0:
cand=v
cnt=1
elif v==cand:
cnt+=1
else:
cnt-=1
if cand is None:
sys.stdout.write('NONE')
else:
c=0
for v in a:
if v==cand:
c+=1
sys.stdout.write(str(cand) if c>n//2 else 'NONE')
import sys
p=sys.stdin.read().strip().split()
if not p: sys.exit(0)
n=int(p[0])
a=list(map(int,p[1:1+n]))
cand=None
cnt=0
for v in a:
if cnt==0:
cand=v
cnt=1
elif v==cand:
cnt+=1
else:
cnt-=1
if cand is None:
sys.stdout.write('NONE')
else:
c=0
for v in a:
if v==cand:
c+=1
sys.stdout.write(str(cand) if c>n//2 else 'NONE')