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

S = [int(x) for x in list(input())]

if len(S) == 1:
    print(1)

elif len(S) == 2:
    if S[0] == S[1]:
        print(2)
    else:
        print(1)
else:
    l = []
    c = 1
    for i in range(len(S) - 1):
        if S[i] == S[i + 1]:
            c += 1
        else:
            l.append(c)
            c = 1
    l.append(c)

    ans = max(l)
    if ans in l[1:-1]:
        print(ans + 1)
    else:
        print(ans)


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

A, B, C, D = [int(x) for x in input().split()]

if A + B > C + D:
    print("Left")

elif A + B == C + D:
    print("Balanced")

elif A + B < C + D:
    print("Right")

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

S = [int(x) for x in list(input())]

if len(S)==1:
    print(1)

elif len(S)==2:
    if S[0] == S[1]:
        print(2)
    else:
        print(1)
else:
    l = []
    c = 1
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            c += 1
        else:
            l.append(c)
            c = 1
    l.append(c)
    ans = max(l)
    if ans in l[1:-1]:
        print(ans+1)
    else:
        print(ans)
    

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

A, B, C, D = [int(x) for x in input().split()]

if A + B > C + D:
    print("Left")

elif A + B == C + D:
    print("Balanced")

elif A + B < C + D:
    print("Right")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

S = [int(x) for x in list(input())]

if len(S)==1:
    print(1)

elif len(S)==2:
    if S[0] == S[1]:
        print(2)
    else:
        print(1)
else:
    l = []
    c = 1
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            c += 1
        else:
            l.append(c)
            c = 1
    l.append(c)
    ans = max(l)
    if ans in l[1:-1]:
        print(ans+1)
    else:
        print(ans)
    

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

A, B, C, D = [int(x) for x in input().split()]

if A + B > C + D:
    print("Left")

elif A + B == C + D:
    print("Balanced")

elif A + B < C + D:
    print("Right")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

S = [int(x) for x in list(input())]

if len(S)==1:
    print(1)

elif len(S)==2:
    if S[0] == S[1]:
        print(2)
    else:
        print(1)
else:
    l = []
    c = 1
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            c += 1
        else:
            l.append(c)
            c = 1
    l.append(c)
    ans = max(l)
    if ans in l[1:-1]:
        print(ans+1)
    else:
        print(ans)
    


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

A, B, C, D = [int(x) for x in input().split()]

if A + B > C + D:
    print("Left")

elif A + B == C + D:
    print("Balanced")

elif A + B < C + D:
    print("Right")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

S = [int(x) for x in list(input())]

if len(S)==1:
    print(1)

elif len(S)==2:
    if S[0] == S[1]:
        print(2)
    else:
        print(1)
else:
    l = []
    c = 1
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            c += 1
        else:
            l.append(c)
            c = 1
    l.append(c)
    ans = max(l)
    #print(l)
    if ans in l[1:-1]:
        print(ans+1)
    else:
        print(ans)


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

A, B, C, D = [int(x) for x in input().split()]

if A + B > C + D:
    print("Left")

elif A + B == C + D:
    print("Balanced")

elif A + B < C + D:
    print("Right")