N = 14 for l in open("input"): for i in range(0, len(l)): if len(set(l[i:i+N])) == N: print(i+N) break