9 lines
192 B
Python
9 lines
192 B
Python
|
import sys
|
||
|
|
||
|
L = sys.stdin.read()
|
||
|
|
||
|
for (i, (a,b,c,d)) in enumerate(zip(L,L[1:],L[2:],L[3:])):
|
||
|
if not (b == a or c == a or c == b or d == a or d == b or d == c):
|
||
|
print(i+4, L[i:i+4])
|
||
|
break
|