#!/usr/bin/env python3 print(next(i+4for l in open("input.txt")for i in range(len(l))if len(set(l[i:i+4]))==4))