qyliang/CodeNanoFix huggingface dataset:
Buggy code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b, c = LI()
    if a[-1] == b[0] and b[-1] == c[0]:
        print("YES")
    else:
        print("NO")
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()


Fixed code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b, c = LS()
    if a[-1] == b[0] and b[-1] == c[0]:
        print("YES")
    else:
        print("NO")
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()
Buggy code:
A,B,C=input().split()

if A[len(A)-1]==B[0] and B[len(B-1)]==C[0]:
  print('YES')
else:
  print('NO')

Fixed code:
A,B,C = input().split()
if(A[-1]==B[0] and B[-1]==C[0]):
  print("YES")
else:
  print("NO")
Buggy code:
s = input().split()
print(s)
if s[0][-1]==s[1][0] and s[1][-1]==s[2][1]:
    print("YES")
else:
    print("NO")


Fixed code:
s = input().split()
if s[0][-1]==s[1][0] and s[1][-1]==s[2][0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=[str(i) for i in input().split()]
if a[-1]==b[1] and b[-1]==c[1]:
  print('YES')
else:
  print('NO')

Fixed code:
a,b,c = (i for i in input().split())
if a[-1] == b[0] and b[-1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c = input().split()
if a[-1] == b[-1] and b[-1] == c[-1]:
  print("YES")
else:
  print("NO")

Fixed code:
a,b,c=input().split()
print("YES" if a[-1] == b[:1] and b[-1] == c[:1] else "NO")
Buggy code:
a=input().split()
if("YES" if a[0][len(a[0])-1]==a[1][0] and a[1][len(a[1])-1]==a[2][0] else "NO")


Fixed code:
a=input().split()
print("YES" if a[0][len(a[0])-1]==a[1][0] and a[1][len(a[1])-1]==a[2][0] else "NO")
Buggy code:
a,b,c=map(str,input().split())
if("YES" if a[len(a)-1]==b[0] and b[len(b)-1]==c[0] else "NO")


Fixed code:
a,b,c=map(str,input().split())
print("YES"if b[0]==a[-1] and c[0]==b[-1] else"NO")
Buggy code:
a,b,c=input().split()
if("YES" if a[len(a)-1]==b[0] and b[len(b)-1]==c[0] else "NO")


Fixed code:
a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]: print('YES')
else: print('NO')
Buggy code:
A, B, C =input().split()

print('YES' if A[-1]==B[0] and B[-1]==C[0] else 'No')

Fixed code:
A,B,C = input().split()
print("YES" if A[-1]==B[0] and B[-1] == C[0] else "NO")
Buggy code:
a,b,c = input().split()

if a[len(a)-1] == b[0] and if b[len(b)-1 == c[0]]:
    print('YES')
else:
    print(ans)

Fixed code:
a,b,c = input().split()

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print('NO')
Buggy code:
A, B, C = map(int, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
  print('YES')
else:
  print('NO')

Fixed code:
A, B, C = input().split()
if A[-1] == B[0] and B[-1] == C[0]:
  print('YES')
else:
  print('NO')
Buggy code:
a,b,c = input().split();print("YNeos"[a[-1]!=b[0] or b[-1]!=c[0]::2])

Fixed code:
a,b,c = input().split();print("YNEOS"[a[-1]!=b[0] or b[-1]!=c[0]::2])
Buggy code:
a,b,c = map(int,input().split())
print('YES' if a[-1] == b[0] and b[-1] == c[0] else 'NO')

Fixed code:
a,b,c = input().split()
print("YES") if a[-1]==b[0] and b[-1]==c[0] else print("NO")
Buggy code:
A,B,C=map(str,input().split())
x=len(A)
y=len(B)
if A[x-1]==B[1] and B[y-1]==C[1]:
  print("YES")
else:
  print("NO")
  

Fixed code:
A,B,C=map(str,input().split())
x=len(A)
y=len(B)
if A[x-1]==B[0] and B[y-1]==C[0]:
  print("YES")
else:
  print("NO")
Buggy code:
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

A, B, C = rl()
bool = A[-1] == B[0] and B[-1] == C[0]
print('YES' if bool else 'NO')

Fixed code:
import sys

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

A, B, C = rs().split()
bool = A[-1] == B[0] and B[-1] == C[0]
print('YES' if bool else 'NO')
Buggy code:
a,b,c=map(str, input().split())
if a[len(a)]==b[0] and b[len(b)]==c[0]:
  print('YES')
else:
  print('NO')

Fixed code:
a,b,c=map(str, input().split())
if a[len(a)-1]==b[0] and b[len(b)-1]==c[0]:
  print('YES')
else:
  print('NO')
Buggy code:
a,b,c = map(string,input().split())
if a[-1] == b[0] and b[-1] == c[0]:
  print('YES')
else :
  print('NO')

Fixed code:
a,b,c = map(str, input().split())
print('YES' if ((a[-1:] == b[0:1]) and (b[-1:] == c[0:1])) else 'NO' )
Buggy code:
a,b,c=input().split()
print "YES" if a[-1] == b[0] && b[-1] == c[0] else "NO"

Fixed code:
a, b, c = input().split()

print("YES" if a[-1]==b[0] and b[-1]==c[0] else "NO")
Buggy code:
a,b,c=input().split()
print "YES" if a[-1] == b[0] and b[-1] == c[0] else "NO"

Fixed code:
a, b, c = input().split()

if( a[len(a) - 1] == b[0] and b[len(b) - 1] == c[0]):
    print("YES")
else:
    print("NO")
Buggy code:
a, b, c = input().split()
if a[len(a-1)] == b[0] and b[len(b-1)] == c[0]:
    print("YES")
else:
    print("NO")


Fixed code:
a,b,c=input().split()
if(a[-1]==b[0] and b[-1]==c[0]):
    print('YES')
else:
    print('NO')
Buggy code:
a,b,c=input().split();print('NYOE S'[a[-1]==b[0]and b[-1]==c[0]]::2)

Fixed code:
a,b,c=input().split();print('NYOE S'[a[-1]==b[0]and b[-1]==c[0]::2])
Buggy code:
A, B, C = input().split()

if A[-1] == B[0] and B[-1] == C[0]:
    print("YES")
else:
    print("No")



Fixed code:
A,B,C = input().split()

if A[-1]==B[0] and B[-1]==C[0]:
  print("YES")

else:
  print("NO")
Buggy code:
a, b, c = input().split()
ans = 'NO'
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
  ans = 'Yes'
print(ans)

Fixed code:
a, b, c = input().split()
ans = 'NO'
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
  ans = 'YES'
print(ans)
Buggy code:
a, b, c = input().split()
if a[0]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")

Fixed code:
a, b, c = input().split()

if a[-1:]==b[:1] and b[-1:]==c[:1]:
	print('YES')
else:
	print('NO')
Buggy code:
a, b, c = map(int, input().split())
if a[-1]==b[0] and b[-1]==c[0]:
  print("YES")
else:
  print("NO")

Fixed code:
a,b,c = map(str, input().split())
if a[-1]==b[0] and b[-1]==c[0]:
  print("YES")
else:
  print("NO")
Buggy code:
A, B, C = list(input().split())
if A[:1] == B[0] and B[-1] == C[0]:
  print("YES")
else:
  print("NO")

Fixed code:
A, B, C = list(input().split())
if A[-1] == B[0] and B[-1] == C[0]:
  print("YES")
else:
  print("NO")
Buggy code:
a,b,c=input().split()
if a[-1::]==b[-1::]==c[-1::]:
  print("YES")
else:
  print("NO")

Fixed code:
a,b,c=input().split()
if a[-1::]==b[0] and b[-1::]==c[0]:
  print("YES")
else:
  print("NO")
Buggy code:
A, B, C = list(map(str, input().split()))
if A[len(A)-1] == B[0] and B[len(B)-1] == C[0]:
    print("YES")
else:
    print("No")


Fixed code:
A, B, C = list(map(str, input().split()))
if A[len(A)-1] == B[0] and B[len(B)-1] == C[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a, b, c = map(str, input().split())

a_last = a[len(a) - 1]
b_last = b[len(b) - 1]

if a_last == b[0] and b_last == c[0] :
    print('YES')
else :
    print('No')

Fixed code:
a, b, c = map(str, input().split())

a_last = a[len(a) - 1]
b_last = b[len(b) - 1]

if a_last == b[0] and b_last == c[0] :
    print('YES')
else :
    print('NO')
Buggy code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b, c = i_map()

    print('YES' if a[-1] == b[0] and b[-1] == c[0] else 'NO')

if __name__ == '__main__':
    main()



Fixed code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b, c = s_map()

    print('YES' if a[-1] == b[0] and b[-1] == c[0] else 'NO')

if __name__ == '__main__':
    main()
Buggy code:
import sys, os
import numpy as np

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b,c = input(), input(), input()
    if a[-1]== b[0] and b[-1] = c[0]:
        print('YES')
    else:
        print('NO')
    

solve()


Fixed code:
import sys, os
import numpy as np

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b,c = input().split()
    if a[-1]== b[0] and b[-1] == c[0]:
        print('YES')
    else:
        print('NO')
    

solve()
Buggy code:
a, b, c = input().split()
print("YES" if a[-1] == b[1] and b[-1] == c[1] else "NO")

Fixed code:
a, b, c = input().split()
print("YES" if a[-1:] == b[:1] and b[-1:] == c[:1] else "NO")
Buggy code:
a,b,c=list(map(str,input().split()))
if a[-1]==b[0] and b[-1]==c[0]:print('YES')
else print('NO')

Fixed code:
a,b,c = map(str, input().split())

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
	print('YES')
	
else:
	print('NO')
Buggy code:
A, B, C = map(int, input().split())
if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('NO')

Fixed code:
A,B,C = map(str, input().split())

if A[-1] == B[0] and B[-1] == C[0]:
  print("YES")
else:
  print("NO")
Buggy code:
# https://atcoder.jp/contests/abc060/tasks/abc060_a

import itertools
import collections
import bisect

def main():
    A, B, C = map(int, input().split())
    print('YES' if A[-1] == B[0] and B[-1] == C[0] else 'NO')

if __name__ == '__main__':
    main()


Fixed code:
# https://atcoder.jp/contests/abc060/tasks/abc060_a

import itertools
import collections
import bisect

def main():
    A, B, C = input().split()
    print('YES' if A[-1] == B[0] and B[-1] == C[0] else 'NO')

if __name__ == '__main__':
    main()
Buggy code:
a, b, c = input().split()
print("YES") if (a[-1] == b[0]) & (b[-1] == a[0]) else print("NO")

Fixed code:
a, b, c = input().split()
print("YES") if (a[-1] == b[0]) & (b[-1] == c[0]) else print("NO")
Buggy code:
a,b,c=map(int,input().split())
if a[-1]==b[0] and b[-1]==c[0]:
    print("YES")
else:
    print("NO")

Fixed code:
a, b, c = map(str,input().split())

if a[-1]==b[0] and b[-1]==c[0]:
  print ("YES")
else:
  print("NO")
Buggy code:
a,b,c=input().split()
print("YES" a[-1]==b[0] and b[-1]==c[0] else "NO")

Fixed code:
a,b,c=input().split()

if a[-1]==b[0] and b[-1]==c[0]:
    print('YES')
else:
    print('NO')
Buggy code:
A,B,C=input().split()
if A[-0]==B[0]:
  if B[-0]==C[0]:
    print("YES")
  else:
    print("NO")

Fixed code:
A,B,C=input().split()
if A[-1]==B[0]:
  if B[-1]==C[0]:
    print("YES")
  else:
    print("NO")
else:
  print("NO")
Buggy code:
A,B,C=input().split()
if A[-1]==B[0]:
  if B[-1]==C[0]:
    print("YES")
  else:
    print("NO")

Fixed code:
A, B, C = map(str, input().split())

if A[-1] == B[0]:
	if B[-1] == C[0]:
		print('YES')
	else:
		print('NO')
else:
	print('NO')
Buggy code:
a,b,c=input().split()
a=list(a)
b=list(b)
c=list(c)
if a[len(a)]==b[0] and b[len(b)]==c[0]:
  print('YES')
else:
  print('NO')

Fixed code:
a,b,c=input().split()
a=list(a)
b=list(b)
c=list(c)
if a[len(a)-1]==b[0] and b[len(b)-1]==c[0]:
  print('YES')
else:
  print('NO')
Buggy code:
A,B,C=input().split()
if (A[len(A)-1]==B[0])and(A[0]==B[len(B)-1]):
    print('YES')
else:
    print('NO')

Fixed code:

A , B , C = input().split()

if A[-1] == B[0] and B[-1] == C[0]:
    print ("YES")

else:
    print ("NO")
Buggy code:
a,b,c=input().split()
s=[a,b,c]
if a[-0]==b[0] and b[-0]==c[0]:
  print("YES")
else:
  print("NO")

Fixed code:
a,b,c=input().split()
s=[a,b,c]
if a[-1]==b[0] and b[-1]==c[0]:
  print("YES")
else:
  print("NO")
Buggy code:
a, b,c = map(str, input().split())
if a[-1]==b[1] and b[-1]==c[1]:
  print('YES')
  exit()
print('NO')

Fixed code:
a, b,c = map(str, input().split())
if a[-1]==b[0] and b[-1]==c[0]:
  print('YES')
  exit()
print('NO')
Buggy code:
a,b,c=input().split
print("YES") if a[-1]==b[0] and b[-1]==c[0] else print("NO")

Fixed code:
a,b,c=input().split()
print("YES") if a[-1]==b[0] and b[-1]==c[0] else print("NO")
Buggy code:
a,b,c = input().split()
print("YES" if a[-1] == b[0] && b[-1] == c[0] else "NO")

Fixed code:
a, b, c = input().split(' ')
print('YES' if a[-1] == b[0] and b[-1] == c[0] else 'NO')
Buggy code:
a, b, c = input().split()

if a[-1] == b[0]:
    if b[-1] == c[0]:
        print('YES')
else:
    print('NO')

Fixed code:
a, b, c = input().split()
if (a[-1] == b[0]) and (b[-1] == c[0]):
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=input().split()
print(a[-1])
print('YES' if a[-1]==b[0] and b[-1]==c[0] else 'NO')

Fixed code:
a, b, c = list(input().split())
ans = 'YES' if a[-1] == b[0] and b[-1] == c[0] else 'NO'
print(ans)
Buggy code:
a,b,c=input().split()
print('YES' if a[-1]==b[1] and b[-1]==c[1] else 'NO')

Fixed code:
a,b,c = input().split()
print("YES" if a[len(a)-1] == b[0] and b[len(b)-1] == c[0] else "NO")
Buggy code:
A,B,C=map(list,input().split())
print(['NO','YES'][A[-1]==B[0] and B[-1]==

Fixed code:
A,B,C=map(list,input().split())
print(['NO','YES'][A[-1]==B[0] and B[-1]==C[0]])
Buggy code:
a,b,c=input().split()
print('YES' if a[::-1]==b[1] and b[::-1]==c[1] else 'NO')

Fixed code:
a, b, c = input().split()
print('YES' if(a[-1] == b[0] and b[-1] == c[0]) else 'NO')
Buggy code:
s = str(input()).split(" "):
if s[0][0] == s[1][-1] and s[1][0] == s[2][-1]:
  print("YES")
else:
  print("NO")

Fixed code:
s = str(input()).split(" ")
if s[0][-1] == s[1][0] and s[1][-1] == s[2][0]:
  print("YES")
else:
  print("NO")
Buggy code:
a, b, c = list(input().split())
if a[::-1] == b[0] and b[::-1] == c[0] and c[::-1] == a[0]:
    print ("YES\n")
else:
    print("NO\n")

Fixed code:
a, b, c = list(input().split())
if a[-1] == b[0] and b[-1] == c[0]:
    print ("YES\n")
else:
    print("NO\n")
Buggy code:
word1,word2,word3 = map(str,input().split())
if word1[-1] == word2[1] and word1[-1] == word2[1]:
  print("YES")
else:
  print("NO")

Fixed code:
word1,word2,word3 = map(str,input().split())
if word1[-1] == word2[0] and word2[-1] == word3[0]:
  print("YES")
else:
  print("NO")
Buggy code:
A,B,C = input().split()
if A[0] == B[-1] and B[0] == C[0]:
    print ("YES")
else:
    print  ("NO")


Fixed code:
if __name__ == "__main__":
    A,B,C = input().split()
    if (A[-1] == B[0] and B[-1] == C[0]):
        print ('YES')
    else:
        print ("NO")
Buggy code:
def main():
        s = raw_input().split()

        if s[0][-1] == s[1][0] and s[1][-1] == s[2][0]:
            print("YES")
        else:
            print("NO")
main()

Fixed code:
def main():
        s = input().split()

        if s[0][-1] == s[1][0] and s[1][-1] == s[2][0]:
            print("YES")
        else:
            print("NO")
main()
Buggy code:
s = input().split()
a, b, c = s[0], s[1], s[2]
if b.startswith(a[-1:]) and c.stratswith(b[-1:]):
  print("YES")
else:
  print("NO")

Fixed code:
s = input().split()
a, b, c = s[0], s[1], s[2]
if b.startswith(a[-1:]) and c.startswith(b[-1:]):
  print("YES")
else:
  print("NO")
Buggy code:
a,b,c=input().split

print("YES" if a[-1]==b[0] and b[-1]==c[0] else "NO")

Fixed code:
a,b,c = input().split()
print(('NO','YES')[a[-1]==b[0] and b[-1]==c[0]])
Buggy code:
a,b,c = input().split()

if a[:-1]==b[0] and b[:-1]==c[0]:
  print("YES")
else:
  print("NO")

Fixed code:
a, b, c = input().split()
if a[-1] == b[0] and b[-1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
A, B, C= input(), input(), input()
if A[-1] == B[0] and B[-1] == C[0]:
    print('YES')
else:
    print('NO')

Fixed code:
A,B,C=input().split()
if (A[-1]==B[0])and(B[-1]==C[0]):
  print("YES")
else:
  print("NO")
Buggy code:
a,b,c=input().split()
if a[:-1]==b[0] and b[:-1]==c[0]:
  print("YES")
else:
  print("NO")

Fixed code:
a, b, c = input().split(' ')
if a[len(a) - 1] == b[0] and b[len(b) - 1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a, b, c = list(input().split(' '))
if a[-1] = b[-1] and b[-1] = c[-1]:
    print('YES')
else:
    print('NO')

Fixed code:
a, b, c = list(input().split(' '))
if a[-1] == b[0] and b[-1] == c[0]:
    print('YES')
else:
    print('NO')
Buggy code:
a, b, c = list(input().split(' '))
if a[-1] = b[0] and b[-1] = c[0]:
    print('YES')
else:
    print('NO')

Fixed code:
a,b,c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
  print("YES")
else:
  print("NO")
Buggy code:
a,b,c=map(input().split())

if a[-1]==b[0] and b[-1]==c[0]:
    print('YES')
else:
    print('NO')


Fixed code:
a,b,c=map(str, input().split())

if a[-1]==b[0] and b[-1]==c[0]:
    print('YES')
else:
    print('NO')
Buggy code:
a,b,c = input().split()
print(a,b,c)
print(['NO','YES'][a[-1]==b[0]and b[-1]==c[0]])

Fixed code:
a,b,c = input().split()
print("YES" if a[-1]==b[0] and b[-1]==c[0] else "NO")
Buggy code:
a, b, c = input().split()

if a[len(a)-1] == b[0] and b[(b)-1] == c[0]:
    print('YES')
else:
    print('NO')

Fixed code:
a, b, c = input().split()
if a[-1] == b[0] and b[-1] == c[0]:
    ans = "YES"
else:
    ans = "NO"
print(ans)
Buggy code:
a,b,c = map(int,input().split())
if a[-1]==b[0] and b[-1]==c[0]:
  print("YES")
else:
  print("NO")

Fixed code:
a, b, c = input().split()
if a[-1] == b[0] and b[-1] == c[0]:
	print('YES')
else:
	print('NO')
Buggy code:
a, b, c = input().split()
if a[-1] == b[0] and b[-1] == c[0]:
  print('YES')
 else:
  print('NO')

Fixed code:
a,b,c = input().split()
if a[-1] == b[0] and b[-1] == c[0]:
    print('YES')
else:
    print('NO')
Buggy code:
a, b, c = list(map(int, input().split()))
if a[-1] == b[0] and b[-1] == c[0]:
    print('YES')
else:
    print('NO')

Fixed code:
a,b,c = map(str,input().split())
a = list(a)
b = list(b)
c = list(c)

if a[-1] == b[0] and b[-1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=input().spit()
if a[-1] ==b[0] and b[-1] ==c[0]:print("YES")
else:print("NO")

Fixed code:
a,b,c=input().split()
if a[-1]==b[0] and b[-1]==c[0]:print('YES')
else: print('NO')
Buggy code:
strs = input().split()
if strs[0][len(strs[0]) -1] == strs[1][0] and strs[1][len(strs[0]) -1] == strs[2][0]:
    print("YES")
else:
    print("NO")

Fixed code:
strs = input().split()
if strs[0][len(strs[0]) -1] == strs[1][0] and strs[1][len(strs[1]) -1] == strs[2][0]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c = input().split()

if a[-1] == b[0]:
    if b[-1] == c[0]:
        print("YES")
else:
    print("NO")

Fixed code:
a,b,c = input().split()

if b[0] == a[-1] and c[0] == b[-1]:
    print("YES")
else:
    print("NO")
Buggy code:
a,b,c=input().strip().split()

if a[-1]==b[0] and b[-1]==c[1]:
  print("YES")
else:
  print("NO")

Fixed code:

a, b, c = input().split()
if a[-1] == b[0] and b[-1] == c[0]:
    print("YES")
else:
    print("NO")
Buggy code:
s=input().split()
print("YES" if s[0][-1]==s[0][0] and s[1][-1]==s[2][0] else 'NO')

Fixed code:
s=input().split()
print("YES" if s[0][-1]==s[1][0] and s[1][-1]==s[2][0] else 'NO')
Buggy code:
l = list(input().split())

if l[0][-1] == l[1][0] and l[1][-1] and l[2][0]:
    print('YES')
else:
    print('NO')

Fixed code:
l = list(input().split())

if l[0][-1] == l[1][0] and l[1][-1] == l[2][0]:
    print('YES')
else:
    print('NO')
Buggy code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    

s1,s2,s3=map(str,input().split())

if s1[-1]==s2[0] and s2[-1]=s3[0]:
	print("YES")
else:
	print("NO")

Fixed code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    

s1,s2,s3=map(str,input().split())

if s1[-1]==s2[0] and s2[-1]==s3[0]:
	print("YES")
else:
	print("NO")
Buggy code:
# -*- coding: utf-8 -*-
def shiritori(a, b):
    return a[len(a)-1:] == b[:1]


a, b, c = map(input().split())
if shiritori(a, b) is True and shiritori(b, c) is True:
    print("YES")
else:
    print("NO")


Fixed code:
# -*- coding: utf-8 -*-
def shiritori(a, b):
    return a[len(a)-1:] == b[:1]


a, b, c = input().split()
if shiritori(a, b) is True and shiritori(b, c) is True:
    print("YES")
else:
    print("NO")
Buggy code:
abc=  imput()
 
a, b, c = abc.split(' ')
if a[-1] == b[0] and b[-1] == c[0]:
    print('YES')
else:
    print('NO')


Fixed code:
abc=  input()
 
a, b, c = abc.split(' ')
if a[-1] == b[0] and b[-1] == c[0]:
    print('YES')
else:
    print('NO')
Buggy code:
A, B, C = map(int, input().split())

if A[-1] == B[0] and B[-1] == C[0]:
    print("YES")
else:
    print("NO")



Fixed code:
A, B, C = input().split()

if A[-1]==B[0] and B[-1]==C[0]:print('YES')
else:print('NO')