line = open("input.txt", 'r').read()
def findFirstValidSequence(length):
for i in range(len(line)-length):
if len(set(line[i:i+length])) == length:
return(i+length)
print(findFirstValidSequence(4))
print(findFirstValidSequence(14))