qyliang/CodeNanoFix huggingface dataset:
Buggy code:
s=input()
for i in range(3):
    if s[i]==s[i+1]:
        print('Bad')
        exit()
print('Yes')


Fixed code:
s=input()
for i in range(3):
    if s[i]==s[i+1]:
        print('Bad')
        exit()
print('Good')
Buggy code:
S = int(input())

if S[0] == S[1] or S [0] == S [2] or S[0] == S[3] or S[1] == S[2] or S[1] == S[3] or S[2] == S [3]:
  print('Bad')
else:
  print('Good')

Fixed code:
S = input()
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print('Bad')
else:
    print('Good')
Buggy code:
a = input()
for i in range(3):
    if a[i] == a[i+1]:
        print("Bad")
        break
print("Good")

Fixed code:
a = input()
for i in range(3):
    if a[i] == a[i+1]:
        print("Bad")
        quit()
print("Good")
Buggy code:
s = int(input())

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
  print('Bad')
else:
  print('Good')


Fixed code:
s=list(input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
    print("Bad")
else:print("Good")
Buggy code:
for i in range(len(l)):
    if l[i]==l[i+1]:
        print('Bad')
        break
else:
    print('Good')

Fixed code:
l=input()
for i in range(len(l)-1):
    if l[i]==l[i+1]:
        print('Bad')
        break
else:
    print('Good')
Buggy code:
s=input()

if s[0] == s[1] or s[1] == s[2] and s[2] == s[3]:
    print("Bad")
else:
    print("Good")

Fixed code:
s=input()

if(s[0]==s[1] or s[1]==s[2] or s[2]==s[3]):
  print("Bad")
else:
  print("Good")
Buggy code:
a=int(input())
if a[0]==a[1] or a[1]==a[2] or a[2]==a[3]:
    print('Bad')
else:
    print('Good')

Fixed code:
a=input()
if a[0]==a[1] or a[1]==a[2] or a[2]==a[3]:
    print('Bad')
else:
    print('Good')
Buggy code:
# -*- coding: utf-8 -*-
S = input()

for i in range(1,4):
  if S[i-1] == S[i]:print("Bad")
else:
  print("Good")


Fixed code:
# -*- coding: utf-8 -*-
S = input()

for i in range(1,4):
  if S[i-1] == S[i]:
	  print("Bad")
	  break
else:
  print("Good")
Buggy code:
import sys
S = int(input())

for i in range(3):
  if S[i] == S[i+1]:
    print("Bad")
    sys.exit()
print("Good")

Fixed code:
import sys
S = input()

for i in range(3):
  if S[i] == S[i+1]:
    print("Bad")
    sys.exit()
print("Good")
Buggy code:
S = list(input())
for i in range(0,3,1):
  if S[i]==S[i+1]:
    print("Bad")
    exit()
print("Yes")

Fixed code:
S = list(input())
for i in range(0,3,1):
  if S[i]==S[i+1]:
    print("Bad")
    exit()
print("Good")
Buggy code:
try:
s = input()
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')
except EOFError:
    pass


Fixed code:
try:
    s = input()
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print('Bad')
    else:
        print('Good')
except EOFError:
    pass
Buggy code:
s = [i for i in input()]

f = 1

for i in range(len(s)-1):
    if f == 1 and s[i] == s[i+1]:
        print('Bad')
        f = 0
if f:
    print('True')

Fixed code:
s = [i for i in input()]

f = 1

for i in range(len(s)-1):
    if f == 1 and s[i] == s[i+1]:
        print('Bad')
        f = 0
if f:
    print('Good')
Buggy code:
s=input()
for i in range(3):
  if s[i]=s[i+1]:
    print('Bad')
    exit()
print('Good')

Fixed code:
s=input()
for i in range(3):
  if s[i]==s[i+1]:
    print('Bad')
    exit()
print('Good')
Buggy code:
S=input()
f=False
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        f=True
        break
if f:
    print("Good")
else:
    print("Bad")

Fixed code:
S=input()

f=False
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        f=True
        break
if f:
    print("Bad")
else:
    print("Good")
Buggy code:
S = input()
num = S[0]
flag = 0
for i in range(1,len(S)):
  if num==S[i]:
    print("Bad")
    flag=1
    break
if flag==0:
  print("Good")

Fixed code:
S = input()
num = S[0]
flag = 0
for i in range(1,len(S)):
  if num==S[i]:
      print("Bad")
      flag=1
      break
  else:
      num=S[i]
if flag==0:
  print("Good")
Buggy code:
# -*- coding: utf-8 -*-

S = input()

for i in range(len(S)):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')


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

S = input()

for i in range(len(S)-1):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')
Buggy code:
s=input()

if s[0] == s[1]:
    print('Bad')
if s[1] == s[2]:
    print('Bad')    
if s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Fixed code:
s=input()

if s[0] == s[1]:
    print('Bad')
    exit()
if s[1] == s[2]:
    print('Bad')   
    exit()
if s[2] == s[3]:
    print('Bad')
    exit()
else:
    print('Good')
Buggy code:
s = list(map(int,input()))

result = True
for i in range(len(s)-1):
    if a[i] == a[i+1]:
        result = bad
        break
if result == "bad":
    print("Bad")
else:
    print("Good")

Fixed code:
s = list(map(int,input()))

result = "True"
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        result = "bad"
        break
if result == "bad":
    print("Bad")
else:
    print("Good")
Buggy code:
input = input()
is_good = True
for i, s in enumerate(input):
    if i > 0 and s == input[i-1]:
        is_good = False
        break
    if i < len(input) and s == input[i+1]:
        is_good = False
        break
if is_good:
    print('Good')
else:
    print('Bad')

Fixed code:
input = input()
is_good = True
for i, s in enumerate(input):
    if i > 0 and s == input[i-1]:
        is_good = False
        break
    if i < len(input) -1 and s == input[i+1]:
        is_good = False
        break
if is_good:
    print('Good')
else:
    print('Bad')
Buggy code:
S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
    else:
        print("Good")


Fixed code:
S = str(input())
l = list(S)

for i in range(len(S)-1):
    if l[i] == l[i+1]:
        print("Bad")
        break
else:
     print("Good")
Buggy code:
s = input()
if s[1] == s[0] or s[2] == s[1] or s[3] == s[2]:
    print("Good")
else:
    print("Bad")


Fixed code:
s = input()
p = list(s)
if p[0]==p[1] or  p[1]==p[2] or  p[2]==p[3]:
    print("Bad")
else:
    print("Good")
Buggy code:
S=input()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('Good')
print('Bad')

Fixed code:
S=input()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('Bad')
        exit()
print('Good')
Buggy code:
s = list((input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print('Bad')
else:
  print('Good')

Fixed code:
s = str(input())

if s[0]==s[1] or s[1]==s[2] or s[3]==s[2]:
    print('Bad')
else:
    print('Good')
Buggy code:
s = list(int(input()))
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print('Bad')
else:
  print('Good')

Fixed code:
s = list(input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print('Bad')
else:
  print('Good')
Buggy code:
import sys

S = input()

for i in range(3):
  if S[i] = S[i+1]:
    print("Bad")
    sys.exit()
print("Good")
  

Fixed code:
import sys
s=input()
for i in range(3):
  if s[i]==s[i+1]:
    print("Bad")
    sys.exit()
print("Good")
Buggy code:
s = input()
if max([len(set(s[i:i+2])) for i in range(len(s)-1)]) == 2:
    print('Bad')
else:
    print('Good')


Fixed code:
s = input()
if min([len(set(s[i:i+2])) for i in range(len(s)-1)]) == 1:
    print('Bad')
else:
    print('Good')
Buggy code:
s=input();print("Good"if s[0]==s[1]or s[1]==s[2]or s[2]==s[3]else"Bad")

Fixed code:
s=input();print("Bad"if s[0]==s[1]or s[1]==s[2]or s[2]==s[3]else"Good")
Buggy code:
i=list(input())
o=0
for j in range(3):
    if int(i[j])==int(i[j+1]):
        print('Bad')
        o+=1
        break
    else:
         None
if o==1:
    print('Good')



Fixed code:
i=list(input())
o=0
for j in range(3):
  if int(i[j])==int(i[j+1]):
    print('Bad')
    o+=1
    break
  else:
    None
if o==0:
  print('Good')
else:
  None
Buggy code:
S = input()
D = 0
for i in range(len(S)-1):
  S[i] == S[i+1]
  print("Bad")

  D = 1
  break
  
if D == 0:
  print("Good")

Fixed code:
S = input()
D = 0
for i in range(len(S)-1):
  if  S[i] == S[i+1]:
    print("Bad")
    D = 1
    break
  
if D == 0:
  print("Good")
Buggy code:
s=input()
for i in range(len(s)):
  if s[i]==s[i+1]:
    print('Bad')
    exit()
    
print('Good')

Fixed code:
s=input()
for i in range(len(s)-1):
  if s[i]==s[i+1]:
    print('Bad')
    exit()
    
print('Good')
Buggy code:
n = int(input())
flag = 0
for i in range(len(n)-1):
  if n[i] == n[i+1]:
    flag = 1

if flag == 1:
  print("Bad")
else:
  print("Good)

Fixed code:
n = input()
flag = 0
for i in range(len(n)-1):
    if n[i] == n[i+1]:
        flag = 1

if flag == 1:
    print("Bad")
else:
    print("Good")
Buggy code:
s=input()
for i in range(1,4):
    if int(s[i-1])==int(s[i])+1 or int(s[i-1])==int(s[i])-1:
        print("Bad")
        exit()
print("Good")


Fixed code:
s=input()
for i in range(1,4):
    if int(s[i-1])==int(s[i]):
        print("Bad")
        exit()
print("Good")
Buggy code:
s=input()
if s[0]==s[1]==s[2]==s[3]:
  print("Good")
else:
  print("Bad")

Fixed code:
s=input()
if s[0]!=s[1]!=s[2]!=s[3]:
  print("Good")
else:
  print("Bad")
Buggy code:
n = list(input());

if n[0] == n[1] or n[1] == n[2] or n[2] == n[3]:
    print("bad")
else:
    print("Good")

Fixed code:
n = list(input());

if n[0] == n[1] or n[1] == n[2] or n[2] == n[3]:
    print("Bad")
else:
    print("Good")
Buggy code:
in_ = input()
for i in range(0,len(in_)-1):
  if in_[i] == in_[i+1]:
    print('Bad')
  else:
    print('Good')

Fixed code:
in_ = input()
is_ok = "Good"
for i in range(0,len(in_)-1):
  if in_[i] == in_[i+1]:
    is_ok = "Bad"
print(is_ok)
Buggy code:
S = input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3] or S[3]==S[4]:
    print('Bad')
else:
    print('Good')

Fixed code:
S = input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
    print('Bad')
else:
    print('Good')
Buggy code:
s = list(input())
 
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print("Bad")
print("Good")

Fixed code:
s = list(input())
 
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print("Bad")
        quit()
print("Good")
Buggy code:
s = input()

flag = True
for i in range(len(s)-1):
  if s[i] == s[i+1]:
    print("Bad")
	flag = False

if flag:
  	print("Good")


Fixed code:
s = input()

flag = True
for i in range(len(s)-1):
  if s[i] == s[i+1]:
    print("Bad")
    flag = False
    break
if flag:
  print("Good")
Buggy code:
S = int(input())

Sstr = str(S)

if Sstr[0] == Sstr[1] or Sstr[1] == Sstr[2] or Sstr[2] == Sstr[3]:
    print("Bad")
else:
    print("Good")

Fixed code:
S=str(input())
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
    print("Bad")
else:
    print("Good")
Buggy code:
n=int(input())
n=list(str(n))
if n[0]==n[1] or n[0]==n[2] or n[0]==n[3] or n[1]==n[2] or n[1]==n[3] or n[2]==n[3]:
  print("Good")
else:
  print("Bad")


Fixed code:
n=str(input())
n=list(n)
if n[0]==n[1] or n[1]==n[2] or n[2]==n[3]:
  print("Bad")
else:
  print("Good")
Buggy code:
S = input()
print(len(S))
for i in range(len(S)-1):
  if S[i] == S[i+1]:
    print("Bad")
    exit()
print("Good")

Fixed code:
S = input()
for i in range(len(S)-1):
  if S[i] == S[i+1]:
    print("Bad")
    exit()
print("Good")
Buggy code:
s = input()
if s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[3]:
  print("Bad")
else:
  print('Good')

Fixed code:
s = input()
if s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[3]:
  print("Good")
else:
  print('Bad')
Buggy code:
i=input()
lst = []
lst = [int(c) for c in str(i)]
#print(len(lst))
flag = 0

for i in range(len(lst) -1):
   if lst[i] == lst[i+1]:
      print("Bad")
      flag = 1

if flag != 1:
  print("Good")

Fixed code:
i=input()
lst = []
lst = [int(c) for c in str(i)]
#print(len(lst))
flag = 0

for i in range(len(lst) -1):
   if lst[i] == lst[i+1]:
      print("Bad")
      flag = 1
      break

if flag != 1:
  print("Good")
Buggy code:

S=input()
for i in range(len(S)-2):
  if S[i]==S[i+1]:
    flag=1
  else:
    flag=0

if flag==0:
  print("Good")
else:
  print("Bad")

Fixed code:

S=input()
for i in range(len(S)-1):
  if S[i]==S[i+1]:
    flag=1
    break
  else:
    flag=0

if flag==0:
  print("Good")
else:
  print("Bad")
Buggy code:
S = input()
pre = '_'
flg = True
for s in S:
  flg = flg and (s!=pre)
print('Good' if flg else 'Bad')

Fixed code:
S = input()
pre = '_'
flg = True
for s in S:
  flg = flg and (s!=pre)
  pre = s
print('Good' if flg else 'Bad')
Buggy code:
S=input()
A=list(S)
if A[0]==A[1] or A[0]==A[2] or A[0]==A[3] or A[1]==A[2] or A[1]==A[3] or A[2]==A[3]:
  print('Bad')
else:
  print('Good')

Fixed code:
S=input()
A=list(S)
if A[0]==A[1] or A[1]==A[2] or A[2]==A[3]:
  print('Bad')
else:
  print('Good')
Buggy code:
flag = False
for i in range(len(s)-1):
    if int(s[i]) == int(s[i+1]):
        flag = True

if flag:
    print('Bad')
else:
    print('Good')

Fixed code:
s = input()
flag = False
for i in range(len(s)-1):
    if int(s[i]) == int(s[i+1]):
        flag = True

if flag:
    print('Bad')
else:
    print('Good')
Buggy code:
n = int(input())

flag = 0
for i in range(3):
  if(n[i] == n[i+1]):
    flag = 1
  if(flag == 1):
    print("Bad")
    break
if(flag == 0):
  print("Good")


Fixed code:
n = input()

flag = 0
for i in range(3):
  if(n[i] == n[i+1]):
    flag = 1
  if(flag == 1):
    print("Bad")
    break
if(flag == 0):
  print("Good")
Buggy code:
s = input()
i = str(s)
for i in range(3):
  if s[i] == s[i+1]:
    print('Bad')
    break
  else:
    print('Good')

Fixed code:
s = input()
i = str(s)
t = 0
for i in range(3):
  if s[i] == s[i+1]:
    print('Bad')
    break
  else:
    t += 1
if t == 3:
  print('Good')
Buggy code:
s=int(input())
S=list(s)
a=0

for i in range(0,3):
    if S[i]==S[i+1]:
        print('Bad')
        break
    else:
        a=a+1

if a==3:
    print('Good')

Fixed code:
s=input()
S=list(s)
a=0

for i in range(0,3):
    if S[i]==S[i+1]:
        print('Bad')
        break
    else:
        a=a+1

if a==3:
    print('Good')
Buggy code:
str = input()

flag = False
for i in range(len(str)) - 1:
  if str[i] == str[i+1]:
    flag = True

print("Bad") if flag else print("Good")

Fixed code:
str = input()

flag = False
for i in range(len(str) - 1):
  if str[i] == str[i+1]:
    flag = True

print("Bad") if flag else print("Good")
Buggy code:
#--Security

code = list(input())

if(code[0] == code[1]):
  print("Bad")
elif(code[1] == code[2]):
  print("Bad")
elif(code[2] == code[3]):
  print("Bad")
else:
  print("Yes")

  

Fixed code:
#--Security

code = list(input())

if(code[0] == code[1]):
  print("Bad")
elif(code[1] == code[2]):
  print("Bad")
elif(code[2] == code[3]):
  print("Bad")
else:
  print("Good")
Buggy code:
num=str(input())
for i in range(1,len(num)):
  if num[i]==num[i-1]:
    print('bad')
    exit()
print('Good')

Fixed code:
num=str(input())
for i in range(1,len(num)):
  if num[i]==num[i-1]:
    print('Bad')
    exit()
print('Good')
Buggy code:
S = input()
count = 0
for i in range(1, 4):
  if S[i-1] == S[i]:
    print("Bad")
    count += 1
if count == 0:
  print("Good")

Fixed code:
S = input()
count = 0
for i in range(1, 4):
  if S[i-1] == S[i]:
    print("Bad")
    count += 1
    break
if count == 0:
  print("Good")
Buggy code:
 input=list(input())
  
 if int(input[0])==int(input[1]) or int(input[1])==int(input[2]) or int(input[2])==int(input[3]):
          print("Bad")
 else:
          print("Good")

Fixed code:
s = list(input())
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
    print('Bad')
else:
    print('Good')
Buggy code:
s = input()

ans = 'Good'

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        ans='Bad'

print(ans

Fixed code:
s = input()
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        print("Bad")
        exit()
print("Good")
Buggy code:
S = input()
prev = S[0]
for s in S[1:]:
  if s == prev:
    print("Bad")
    exit()
    
print("Good")

Fixed code:
S = input()
prev = S[0]
for s in S[1:]:
  if s == prev:
    print("Bad")
    exit()
  prev = s
    
print("Good")
Buggy code:
input_line = input()
last_c = ''
bad = False
for i in range(len(input_line)):
  c = input_line[i]
  if last_c == c:
    print('Bad')
    bad = true
    break
if not bad:
  print('Good')
  

Fixed code:
input_line = input()
last_c = ''
bad = False
for i in range(len(input_line)):
  c = input_line[i]
  if last_c == c:
    print('Bad')
    bad = True
    break
  last_c = c
if not bad:
  print('Good')
Buggy code:
s=input()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Good")
else:
  print("Bad")

Fixed code:
s=input().rstrip()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
    print('Bad')
else:
    print('Good')
Buggy code:
s = input()

tmp = ""
for val in s:
  if tmp == val:
    print("Bad")
    import sys.exit(0)
  tmp = val

print("Good")

Fixed code:
s = input()
 
tmp = ""
for val in s:
  if tmp == val:
    print("Bad")
    import sys
    sys.exit(0)
  tmp = val
 
print("Good")
Buggy code:
s = input()
for c, d in zip(s, s[1:]):
  if c == d:
    print('Bad')
 	break
else:
  print('Good')
 

Fixed code:
s = input()
for c, d in zip(s, s[1:]):
  if c == d:
    print('Bad')
    break
else:
  print('Good')
Buggy code:
s = input()
res = "Good"
for i in range(1,len(s),1):
    if s[i-1] == s[i]:
        res = "BAD"

print(res)

Fixed code:
s = input()
res = "Good"
for i in range(1,len(s),1):
    if s[i-1] == s[i]:
        res = "Bad"
print(res)
Buggy code:
S=input()
print("Bad" if S[0]==S[1] or S[1]==[2] or S[2]==S[3] else "Good")


Fixed code:
S=input()
print("Bad" if S[0]==S[1] or S[1]==S[2] or S[2]==S[3] else "Good")
Buggy code:
s = input()
if(s[0] == s[1] or s[1] == s[2] or s[2] == s[3]):
  print('Good')
else:
  print('Bad')

Fixed code:
s=input()

if s[1]==s[0] or s[1]==s[2] or s[2]==s[3]:
    print('Bad')
else:
    print('Good')
Buggy code:
S = str(input())

if S[0] == S[1] or S[1]==S[2] or S[2]==S[3] or S[3]==S[4]:
  print('Bad')
else:
  print('Good')

Fixed code:
S = str(input())

if S[0] == S[1] or S[1]==S[2] or S[2]==S[3]:
  print('Bad')
else:
  print('Good')
Buggy code:
S = input()
cnt = 1

for i in range(len(S)-1):
    if S[i] == S[i+1]:
        cnt = 0
        exit()
        
if cnt:
    print("Good")
else:
    print("Bad")

Fixed code:
S = input()
cnt = 1

for i in range(len(S)-1):
    if S[i] == S[i+1]:
        cnt = 0
        

if int(cnt):
    print("Good")
else:
    print("Bad")
Buggy code:
s = str(input())
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3] or s[3] == s[4]:
    print('Bad')
else:
    print('Good')

Fixed code:
s=str(input())

if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
    print('Bad')
else:
    print('Good')
Buggy code:
a = int(input())
print("Bad" if a[0] == a[1] or a[1] == a[2] or a[2] == a[3] else "Good")

Fixed code:
a = input()
print("Bad" if a[0] == a[1] or a[1] == a[2] or a[2] == a[3] else "Good")
Buggy code:
S = list(input())
for i in range(1,4):
  if S[i] == S[i-1]:
    print("Bad")
	break
print("Good")

Fixed code:
S = list(input())
for i in range(1,4):
  if S[i] == S[i-1]:
    print("Bad")
    exit()
print("Good")
Buggy code:
s = list(input())
for i in range[3]:
  if (s[i] == s[i+1] ):
  print('Bad')
  exit()
else:
  print('Good')


Fixed code:
S = list(input())
for i in range(3):
    if(S[i]==S[i+1]):
        print('Bad')
        exit()
else:
    print('Good')
Buggy code:
S = input()
for i in range(len(S)):
    if S[i] == S[i+1]:
        print("Bad")
        exit()
print("Good")

Fixed code:
S = input()
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        print("Bad")
        exit()
print("Good")
Buggy code:
password = input()

result = 'Good'

for i in range(len(password)-1):
  ):
    if password[i] == password[i+1]:
      result = 'Bad'
      break
      
print(result)
  

Fixed code:
password = input()

result = 'Good'

for i in range(len(password)-1):
    if password[i] == password[i+1]:
      result = 'Bad'
      break
      
print(result)
Buggy code:
S=input()
for i in range(3):
  if s[i]==s[i+1]:
    print('Bad')
    exit(0)
print('Good')

Fixed code:
S=input()
for i in range(3):
  if S[i]==S[i+1]:
    print('Bad')
    exit(0)
print('Good')
Buggy code:
a=input()
ca=a[0]
for c in a[1:]:
  if ca == c:
    print('Bad')
    return
  ca = c
print('Good')

Fixed code:
def main():
    a=input()
    ca=a[0]
    for c in a[1:]:
        if ca == c:
            print('Bad')
            return
        ca = c
    print('Good')

main()
Buggy code:
n,l=map(int,input().split())
min =1000
ans = 0
for i in range(n):
    if(min > abs(i+l)):
        min = abs(i+l)
    ans = ans+i+l
print(ans-min)

Fixed code:
n,l=map(int,input().split())
min =1000
ans = 0
for i in range(n):
    if(min > abs(i+l)):
        min = abs(i+l)
    ans = ans+i+l
if(ans < 0):
    print(ans+min)
else:
    print(ans-min)
Buggy code:
n,l=map(int,input().split())
a=[l+n for i in range(n)]
dif = 10**18
for i in range(n):
  if dif > abs(a[i]):
    dif = abs(a[i])
    difr= a[i]
print(sum(a)-difr)

Fixed code:
n,l=map(int,input().split())
a=[l+i for i in range(n)]
dif = 10**18
for i in range(n):
  if dif > abs(a[i]):
    dif = abs(a[i])
    difr= a[i]
print(sum(a)-difr)
Buggy code:
N,L=map(int,input().split())
a=list(range(N,N+L))
print(sum(a)-min(a,key=abs))

Fixed code:
N,L=map(int,input().split())
a=list(range(L,N+L))
print(sum(a)-min(a,key=abs))
Buggy code:
N, L = map(int, input().split())

if L >= 0:
  N_eat = 1
elif N+L-1 <= 0:
  N_eat = N
else:
  N_eat = 1-L
pie = double(N*N/2 +N*(L-1) - (L + N_eat-1) ) 
print(pie)


Fixed code:
N, L = map(int, input().split())
 
if L > -1:
  N_eat = 1
elif N+L-1 < 1:
  N_eat = N
else:
  N_eat = 1-L
 
pie = N*(N+1)/2 +N*(L-1) - (L + N_eat-1) 
print(int(pie) )
Buggy code:
N, L = map(int, input().split())

taste = [L + i for i in range(N)]
taste_abs = [abs(i) for i in taste]
eat = min(taste_abs)

print(sum(taste) - eat)


Fixed code:
N, L = map(int, input().split())

taste = [L + i for i in range(N)]
taste_abs = [abs(i) for i in taste]
min_index = taste_abs.index(min(taste_abs))
eat = taste[min_index]

print(sum(taste) - eat)
Buggy code:
N,L = map(int,input().split())
sumL = 0
mainasu = 0
plus = 0
aji = []
for i in range(N):
  aji.append(L + i)
  sumL += L + i
  if L + i == 0:
    count = 1
  elif L + i  < 0:
    mainasu += 1
  elif L + i > 0:
    plus += 1
if count == 1:
  print(sumL)
elif mainasu > plus :
  print(sumL-max((aji)))
else:
  print(sumL-min((aji)))
  

Fixed code:
N,L = map(int,input().split())
sumL = 0
mainasu = 0
plus = 0
aji = []
count = 0
for i in range(N):
  aji.append(L + i)
  sumL += L + i
  if L + i == 0:
    count = 1
  elif L + i  < 0:
    mainasu += 1
  elif L + i > 0:
    plus += 1
if count == 1:
  print(sumL)
elif mainasu > plus :
  print(sumL-max((aji)))
else:
  print(sumL-min((aji)))
Buggy code:
# 131 B

n, l = map(int, input().split())
cmin = float('inf')
sum = 0

for i in range(1, n+1):
    f = l + i - 1
    sum += f
    if f >= 0:
        cmin = min(cmin, f)
    else:
        cmin = max(cmin, f)

print(sum - cmin)

Fixed code:
# 131 B

n, l = map(int, input().split())
cmin = float('inf')
sum = 0

for i in range(1, n+1):
    f = l + i - 1
    sum += f
    if cmin >= 0:
        cmin = min(cmin, f)
    else:
        cmin = max(cmin, f)

print(sum - cmin)
Buggy code:
n,l=map(int,input().split())
d=114514
num=114514
for j in range(n):
  if abs(l+j)<d:
    d=abs(l+j)
    num=j
s=0
for in range(n):
  s+=1
print(s+(n-1)*l-num)


Fixed code:
n,l=map(int,input().split())
d=114514
num=114514
for j in range(n):
  if abs(l+j)<d:
    d=abs(l+j)
    num=j
s=0
for i in range(n):
  s+=i
print(s+(n-1)*l-num)
Buggy code:
N,L=map(int,input().split())
souwa=(L-1)*N+N*(N+1)//2
print(souwa-L if L>=0 else souwa if -N+1<=L<0 else souwa-(L+i-1) )

Fixed code:
N,L=map(int,input().split())
souwa=(L-1)*N+N*(N+1)//2
print(souwa-L if L>=0 else souwa if -N+1<=L<0 else souwa-(L+N-1) )
Buggy code:
n,l = map(int,input().split())
 
s=0

if l>=0:
    for val in range(n-1):
        s += val+l+1
        


elif l < 0 and l >= -l:
    for val in range(n):
        s += val + l
        
else:
    for val in range(n-1):
        s += val + l



print(s)

Fixed code:
n,l = map(int,input().split())
 
s=0

if l>=0:
    for val in range(n-1):
        s += val+l+1
        


elif l < 0 and n > -l:
    for val in range(n):
        s += val + l
        
else:
    for val in range(n-1):
        s += val + l



print(s)