Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = input()

ans = ''

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans = ' '.join([str(i+1), str(i+2)])
for j in range(len(s)-2):
    if s[i] == s[i+1] == s[i+2]:
        ans = ' '.join([str(i+1), str(i+3)])

if ans:
    print(ans)
else:
    print('-1 -1')


Fixed submission:
# -*- coding: utf-8 -*-

s = input()

ans = ''

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans = ' '.join([str(i+1), str(i+2)])
for j in range(len(s)-2):
    if s[j] == s[j+2]:
        ans = ' '.join([str(j+1), str(j+3)])

if ans:
    print(ans)
else:
    print('-1 -1')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = input()

double = []
triple = []

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        double = [str(i+1), str(i+2)]
for j in range(len(s)-2):
    if s[i] == s[i+1] == s[i+2]:
        triple = [str(i+1), str(i+3)]
        
if double == [] and triple == []:
    print('-1 -1')
else:
    if double:
        print(' '.join(double))
    else:
        print(' '.join(triple))
    

Fixed submission:
# -*- coding: utf-8 -*-

s = input()

ans = ''

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans = ' '.join([str(i+1), str(i+2)])
for j in range(len(s)-2):
    if s[j] == s[j+2]:
        ans = ' '.join([str(j+1), str(j+3)])

if ans:
    print(ans)
else:
    print('-1 -1')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = input()

double = []
triple = []

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        double = [str(i+1), str(i+2)]
for j in range(len(s)-2):
    if s[i] == s[i+1] == s[i+2]:
        triple = [str(i+1), str(i+3)]
        
if double == [] and triple == []:
    print('-1 -1')
elif double:
    print(' '.join(double))
else:
    print(' '.join(triple))
    

Fixed submission:
# -*- coding: utf-8 -*-

s = input()

ans = ''

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans = ' '.join([str(i+1), str(i+2)])
for j in range(len(s)-2):
    if s[j] == s[j+2]:
        ans = ' '.join([str(j+1), str(j+3)])

if ans:
    print(ans)
else:
    print('-1 -1')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = input()

double = []
triple = []

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        double = [str(i+1), str(i+2)]
for j in range(len(s)-2):
    if s[i] == s[i+1] == s[i+2]:
        triple = [str(i+1), str(i+3)]
        
if double:
    print(' '.join(double))
elif triple:
    print(' '.join(triple))
else:
    print('-1 -1')
    

Fixed submission:
# -*- coding: utf-8 -*-

s = input()

ans = ''

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans = ' '.join([str(i+1), str(i+2)])
for j in range(len(s)-2):
    if s[j] == s[j+2]:
        ans = ' '.join([str(j+1), str(j+3)])

if ans:
    print(ans)
else:
    print('-1 -1')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

s = input()

double = []
triple = []

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        double = [str(i+1), str(i+2)]
    if s[i] == s[i+1] == s[i+2]:
        triple = [str(i+1), str(i+3)]
        
if double:
    print(' '.join(double))
elif triple:
    print(' '.join(triple))
else:
    print('-1 -1')
    

Fixed submission:
# -*- coding: utf-8 -*-

s = input()

ans = ''

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans = ' '.join([str(i+1), str(i+2)])
for j in range(len(s)-2):
    if s[j] == s[j+2]:
        ans = ' '.join([str(j+1), str(j+3)])

if ans:
    print(ans)
else:
    print('-1 -1')