k=int(input())
a=input()
tnt=0
str1=a[0]
for i in a:
if tnt>=k: print(str1) break if i!=str1: str1=i tnt=1 else: tnt+=1
else:
print('no')