ZhenlongDai/ACPR huggingface dataset:
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())

for i in range(len(s)):
    s = s[len(s) - 1:] + s[0:len(s) - 1]
    print(s)
    print(t)
    if s == t:
        print("Yes")
        exit()

print("No")

Failing test case input:
dba
rab

Expected output:
No


Actual output:
['a', 'd', 'b']
['r', 'a', 'b']
['b', 'a', 'd']
['r', 'a', 'b']
['d', 'b', 'a']
['r', 'a', 'b']
No


Fixed submission (verdict: Accepted):
s = list(input())
t = list(input())

for i in range(len(s)):
    s = s[len(s) - 1:] + s[0:len(s) - 1]
    if s == t:
        print("Yes")
        exit()

print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
r = "No"
for i in range(1,len(s)):
  if s[i:]+s[:i] == t:
    r = "Yes"
    break
print(r)

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
r = "No"
for i in range(len(s)):
  if s[i:]+s[:i] == t:
    r = "Yes"
    break
print(r)

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
tmps = s[-1] + s[:-1]
while True:
	tmps = tmps[-1] + tmps[:-1]
	if tmps == t or tmps != s:
		print ("Yes")
		exit()
print("No")

Failing test case input:
aaa`cbaaa`ba`bba
aba`aaabbaaabaaa

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
t = input()
tmps = s[-1] + s[:-1]
if tmps == t:
	print ("Yes")
	exit()
while tmps != s:
	tmps = tmps[-1] + tmps[:-1]
	if tmps == t:
		print ("Yes")
		exit()
print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

N = len(S)

flag = False
for i in range(N):
  for j in range(N):
    if S[i+j-N] != T[j]:
      break
    flag = True

if flag:
  print('Yes')
else:
  print('No')

Failing test case input:
kzqso
qu{mn

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
T = input()

N = len(S)

flag = False
for i in range(N):
  for j in range(N):
    if S[i+j-N] != T[j]:
      break
    if j == N-1:
      flag = True

if flag:
  print('Yes')
else:
  print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=str(input())
t=str(input())
a=True
for i in range(len(s)):
    if s==t:
        a=False
        break
    s=s[-1]+s[:-2]
if a:
    print("No")
else:
    print("Yes")
    

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s=str(input())
t=str(input())
a=True
for i in range(len(s)):
    if s==t:
        a=False
        break
    s=s[-1]+s[:-1]
if a:
    print("No")
else:
    print("Yes")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
t=list(input())
flag=0
for a in range(len(s)+3):
    t.append(t.pop(0))
    if s==t:
        print("Yes")
        flag=1
if flag==0:
    print("No")

Failing test case input:
kyoto
tokyo

Expected output:
Yes

Actual output:
Yes
Yes


Fixed submission (verdict: Accepted):
s=list(input())
t=list(input())
flag=0
for a in range(len(s)+2):
    if s==t:
        print("Yes")
        flag=1
        break
    t.append(t.pop(0))
if flag==0:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(input())
b=list(input())
a=a+a

if len(a)!=len(b):
  print("No")
else:
    for i in range(len(b)):
        if b==a[i:i+len(b)]:
            print("Yes")
            break
        if i==len(b)-1:
            print("No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a=list(input())
b=list(input())
a=a+a

if len(a)/2!=len(b):
  print("No")
else:
    for i in range(len(b)):
        if b==a[i:i+len(b)]:
            print("Yes")
            break
        if i==len(b)-1:
            print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
t=input()

for i in range(len(s)):
    s=s[-1]+s[:len(s)-1]
    if s==t:
        print('Yes')
        break
    if i==len(s)-1:
        print('NO')

Failing test case input:
kzpso
lmtzn

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
s=input()
t=input()

for i in range(len(s)):
    s=s[-1]+s[:len(s)-1]
    if s==t:
        print('Yes')
        break
    if i==len(s)-1:
        print('No')

Problem: p03293
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
T = input()

characters_num = len(T)

for i in range(characters_num):
    rotation_S = S[i:] + S[:i]
    print(rotation_S)
    if rotation_S == T:
        answer = 'Yes'
        break
    else:
        answer = 'No'

print(answer)

Failing test case input:
kzqso
n{muq

Expected output:
No


Actual output:
kzqso
zqsok
qsokz
sokzq
okzqs
No


Fixed submission (verdict: Accepted):
S = input()
T = input()

characters_num = len(T)

for i in range(characters_num):
    rotation_S = S[i:] + S[:i]
    if rotation_S == T:
        answer = 'Yes'
        break
    else:
        answer = 'No'
print(answer)

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()

for i in range(len(s)):
    compstr = s[i:] + s[0:i]
    if compstr == t:
        print("yes", end="")
        exit()
print("no", end="")


Failing test case input:
bbc
abr

Expected output:
No


Actual output:
no

Fixed submission (verdict: Accepted):
s = input()
t = input()

for i in range(len(s)):
    compstr = s[i:] + s[0:i]
    if compstr == t:
        print("Yes", end="")
        exit()
print("No", end="")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = input(), input()
for i in range(len(s)):
    print(s[len(s)-i:]+s[:len(s)-i])
    if t == s[len(s)-i:]+s[:len(s)-i]:
        print('Yes')
        break
else:
    print('No')

Failing test case input:
cba
arc

Expected output:
No


Actual output:
cba
acb
bac
No


Fixed submission (verdict: Accepted):
s, t = input(), input()
for i in range(len(s)):
    if t == s[len(s)-i:]+s[:len(s)-i]:
        print('Yes')
        break
else:
    print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
word = [x for x in T]
for i in range(len(word)):
    a = word[0]
    word.append(a)
    word.remove(a)
    if S == word:
        break
    else:
        pass
if S == word:
    print('Yes')
else:
    print('No')

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
word = [x for x in T]
for i in range(len(word)):
    a = word[0]
    word.append(a)
    word.remove(a)
    if S == ''.join(word):
        break
    else:
        pass
if S == ''.join(word):
    print('Yes')
else:
    print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
flag = False
for i in range(len(S)+1):
    print(S)
    if(S==T):
        print("Yes")
        flag = True
    S = S[-1:] + S[:-1]
if flag == False:
    print("No")


Failing test case input:
cbb
rba

Expected output:
No


Actual output:
cbb
bcb
bbc
cbb
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
sc = S
flag = False
for i in range(len(sc)):
    if(sc==T and flag==False):
        print("Yes")
        flag = True
    tmp1 = sc[-1:]
    tmp2 = sc[:-1]
    
    
    sc = tmp1 + tmp2
if flag == False:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
N = len(S)
flag = False

for i in range(N):
    t = S[-1] + S[:-1]
    if t == T:
        flag = True
        break

if flag:
    print('Yes')
else:
    print('No')

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
N = len(S)
flag = False

for i in range(N):
    t = S[-1] + S[:-1]
    S = t
    if t == T:
        flag = True
        break

if flag:
    print('Yes')
else:
    print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s = str(input())
t = str(input())

slen = len(s)
tlen = len(t)

if slen != tlen:
    print("No")

for i in range(slen):
    if s == t:
        print("Yes")
        break
    s = s[-1] + s[:-1]

Failing test case input:
aaa`cbaaa`aa`bba
abaaaaabbaaabaaa

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):

s = str(input())
t = str(input())

slen = len(s)
tlen = len(t)

if slen != tlen:
    print("No")

for i in range(slen):
    if s == t:
        print("Yes")
        break
    s = s[-1] + s[:-1]

if s != t:
    print("No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
T = list(input())

change = []
flag = 0

for i in range(len(S)):
  if S[0] == T[i]:
    for j in range(len(S) - i):
      change.append(T[j+i])
    for k in range(i):
      change.append(T[k])
    for check in range(len(S)):
      if S[check] != change[check]:
        flag = 1
        break
      

if flag == 1:
  print("No")
else:
  print("Yes")

Failing test case input:
dac
bbs

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
Spr = input()
T = list(input())
S = list(Spr)

change = ""
ok = 0

for i in range(len(S)):
  if S[0] == T[i]:
    for j in range(len(S) - i):
      change += T[j+i]
    for k in range(i):
      change += T[k]
    if Spr == change:
      if ok == 0:
      	print("Yes")
      	ok = 1
    change = ""

if i == len(S) - 1 and ok == 0:
  print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
ans = 'No'
for i in range(len(S)):
  if S[i:]+S[i] == T:
    ans = 'Yes'
    break
print(ans)

Failing test case input:
kyoto
tokyo

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
ans = 'No'
for i in range(len(S)):
  if S[i:]+S[:i] == T:
    ans = 'Yes'
    break
print(ans)

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
if s == t:
    print("Yes")
    quit()
for i in range(1,len(s)):
    s_remain = s[:len(s)-i]
    s_tofront = s[len(s)-i:]
    print(s_tofront + s_remain)
    if s_tofront + s_remain == t:
        print("Yes")
        quit()
print("No")

Failing test case input:
cbb
rba

Expected output:
No


Actual output:
bcb
bbc
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
for i in range(len(s)):
    s_remain = s[:len(s)-i]
    s_tofront = s[len(s)-i:]
    if s_tofront + s_remain == t:
        print("Yes")
        quit()
print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

S = input()
T = input()
for i in range(len(T)):
    if S == T:
        print('Yes')
        exit()
    else:
        S = S[-1] + S[:-1]
        print(S)
print('No')

Failing test case input:
aaaaabaaabaaabba
aaabaaaaaaabaaba

Expected output:
No


Actual output:
aaaaaabaaabaaabb
baaaaaabaaabaaab
bbaaaaaabaaabaaa
abbaaaaaabaaabaa
aabbaaaaaabaaaba
aaabbaaaaaabaaab
baaabbaaaaaabaaa
abaaabbaaaaaabaa
aabaaabbaaaaaaba
aaabaaabbaaaaaab
baaabaaabbaaaaaa
abaaabaaabbaaaaa
aabaaabaaabbaaaa
aaabaaabaaabbaaa
aaaabaaabaaabbaa
aaaaabaaabaaabba
No


Fixed submission (verdict: Accepted):

S = input()
T = input()
for i in range(len(T)):
    if S == T:
        print('Yes')
        exit()
    else:
        S = S[-1] + S[:-1]
print('No')
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()

def match(a, b):
    for i in range(len(a)):
        if a[i:] + a[:i] == b:
            return True

    return False

if match(s, t):
    print("yes")
else:
    print("no")



Failing test case input:
dac
sab

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
s = input()
t = input()

def match(a, b):
    for i in range(len(a)):
        if a[i:] + a[:i] == b:
            return True

    return False

if match(s, t):
    print("Yes")
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import deque

S = deque(input())
T = deque(input())

for _ in range(len(S)):
    if S == T:
        print('Yes')
        break
else:
    print('No')




Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import deque

S = deque(input())
T = deque(input())

for _ in range(len(S)):
    if S == T:
        print('Yes')
        break
    S.rotate()
else:
    print('No')

Problem: p03293
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = [str(x) for x in input()]
t = [str(x) for x in input()]

def solve(s_list,t_list,n):
    if n== 120:
        return print("No")
    a = s_list.pop(-1)
    s_list.insert(0,a)
    if s_list ==t_list:
        return print("yes")
    else:
        solve(s,t,n+1)

solve(s,t,0)

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
yes


Fixed submission (verdict: Accepted):
s = [str(x) for x in input()]
t = [str(x) for x in input()]

def solve(s_list,t_list,n):
    if n== 120:
        return print("No")
    a = s_list.pop(-1)
    s_list.insert(0,a)
    if s_list ==t_list:
        return print("Yes")
    else:
        solve(s,t,n+1)

solve(s,t,0)

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
flg = True
for i in range(0,len(S)):
    if S[i] == T[-i]:
        continue
    else:
        print('No')
        flg = False
        break

if flg:
    print('Yes')


Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()

for i in range(0,len(S)):
    if S == T:
        print('Yes')
        break
    else:
        T = T[len(T)-1]+T[0:len(T)-1]
else:
    print('No')
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
N = ""
flg = False
for i in range(len(S)):
    N = S[i:]+S[:i]
    print(N)
    if N == T:
        flg = True
if flg:
  print("Yes")
else:
  print("No")

Failing test case input:
aba`cbaaa`ba_aba
aaaba_`bbaaaaab`

Expected output:
No


Actual output:
aba`cbaaa`ba_aba
ba`cbaaa`ba_abaa
a`cbaaa`ba_abaab
`cbaaa`ba_abaaba
cbaaa`ba_abaaba`
baaa`ba_abaaba`c
aaa`ba_abaaba`cb
aa`ba_abaaba`cba
a`ba_abaaba`cbaa
`ba_abaaba`cbaaa
ba_abaaba`cbaaa`
a_abaaba`cbaaa`b
_abaaba`cbaaa`ba
abaaba`cbaaa`ba_
baaba`cbaaa`ba_a
aaba`cbaaa`ba_ab
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
N = ""
flg = False
for i in range(len(S)):
    N = S[i:]+S[:i]
    if N == T:
        flg = True
if flg:
  print("Yes")
else:
  print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(input())
s=list(input())
b=False
for i in range(len(s)):
  d=a[0]
  del a[0]
  a.append(d)
  if a==s:
    print("Yes")
    break
if b==False:
  print("No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
a=list(input())
s=list(input())
b=False
for i in range(len(s)):
  d=a[0]
  del a[0]
  a.append(d)
  if a==s:
    print("Yes")
    b=True
    break
if b==False:
  print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
T=input()

for i in range(100):
  if S[-1-i:-1:-1]+S[0:100-i] ==T:
    print("Yes")
    break
else:
  print("No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S=input()
T=input()

for i in range(100):
  if S[-i:]+S[0:len(S)-i] ==T:
    print("Yes")
    break
else:
  print("No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
t=list(input())
ans='No'
for i in range(len(s)+1):
    if s==t:
        ans='Yes'
        break
    s.insert(0,s.pop())
    print(s)
print(ans)

Failing test case input:
`aaadbaaa`aaabba
aaabaaaaaaabaaba

Expected output:
No


Actual output:
['a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b']
['b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b']
['b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a']
['a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a']
['a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a']
['a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`']
['`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a']
['a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a']
['a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b', 'a']
['a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd', 'b']
['b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a', 'd']
['d', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a', 'a']
['a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a', 'a']
['a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`', 'a']
['a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a', '`']
['`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b', 'a']
['a', '`', 'a', 'a', 'a', 'd', 'b', 'a', 'a', 'a', '`', 'a', 'a', 'a', 'b', 'b']
No


Fixed submission (verdict: Accepted):
s=list(input())
t=list(input())
ans='No'
for i in range(len(s)+1):
    if s==t:
        ans='Yes'
        break
    s.insert(0,s.pop())
print(ans)

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = str(input())
t = str(input())

ans = 'Yes'

for i in range(len(s)):
    if s[i] in t:
        t.replace(s[i], '', 1)
    elif s[i] not in t:
        ans = 'No'
        break


print(ans)



Failing test case input:
baaaaaaaabaaaaaa
aaaaaaaaaaabaaaa

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = str(input())
t = str(input())

for i in range(len(s)):
    if s != t:
        s = s[-1] + s[:-1]

    else:
        print('Yes')
        break

else:
    print('No')
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):





















from collections import defaultdict
import sys,heapq,bisect,math,itertools,string
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7


S1 = input()
S2 = input()

for i in range(len(S2)-1):
	S2 = S2[-1] + S2[:-1]
	if S2 == S1:
		print('Yes')
		sys.exit()

print('No')


Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):





















from collections import defaultdict
import sys,heapq,bisect,math,itertools,string
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7


S1 = input()
S2 = input()

for i in range(len(S2)):
	S2 = S2[-1] + S2[:-1]
	if S2 == S1:
		print('Yes')
		sys.exit()

print('No')

Problem: p03293
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s = input()
t = input()
flag = False
for i in range(len(s)):
    if s == t:
        flag =True
    s = s[-1] + s[::len(s)-1]
if flag:
    print("Yes")
else:
    print("No")


Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
flag = False
for i in range(len(s)):
    if s == t:
        flag =True
    s = s[-1] + s[0:len(s)-1]
if flag:
    print("Yes")
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

n = len(S)
e = 0
for i in range(n):
    R = S[i:n] + S[0:i]
    if T == R:
        print("yes")
        e = 1
        break

if e == 0:
    print("no")


Failing test case input:
bcb
abr

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
S = input()
T = input()

n = len(S)
e = 0
for i in range(n):
    R = S[i:n] + S[0:i]
    if T == R:
        print("Yes")
        e = 1
        break

if e == 0:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) 


if __name__ == '__main__':
    s = input()
    t = input()

    if s == t or s[::-1] ==t:
        print("Yes")
    else:
        print("No")

Failing test case input:
kyoto
tokyo

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) 


if __name__ == '__main__':
    s = input()
    t = input()

    for i in range(len(s)):
        if s[i:]+s[:i] == t:
            print("Yes")
            break
        if i == len(s)-1:
            print("No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = str(input())
t = str(input())

ans = 'No'

for i in range(len(s) - 1):
    if s != t:
        s = s[-1] + s[:-1]

    else:
        print('Yes')

else:
    print('No')


Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No


Fixed submission (verdict: Accepted):
s = str(input())
t = str(input())

for i in range(len(s)):
    if s != t:
        s = s[-1] + s[:-1]

    else:
        print('Yes')
        break

else:
    print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
t2 = t[-1] + t[:-1]
while t2 != t:
  if s == t2:
    print("yes")
    exit()
  t2 = t2[-1] + t2[:-1]
print("no")


Failing test case input:
kzpso
lmtyn

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
s = input()
t = input()
for _ in range(len(t)):
  if s == t:
    print("Yes")
    exit()
  t = t[-1] + t[:-1]
print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
t=input()

def change(s):
    u=str()
    for i in range(len(s)):
        if i==0:
            u+=s[len(s)-1]
        else:
         u+=s[i-1]
    return u

flag=False

if(s==t): 
    print("Yes")
    frag=True

for i in range(len(s)-1):
    s=change(s)
    
    if(s==t):
        print("Yes")
        flag=True
        break

if(flag==False):
    print("No")
    

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):
s=input()
t=input()

def change(s):
    u=str()
    for i in range(len(s)):
        if i==0:
            u+=s[len(s)-1]
        else:
         u+=s[i-1]
    return u

flag=False

if(s==t): 
    flag=True

for i in range(len(s)-1):
    s=change(s)
    
    if(s==t):
        flag=True
        break

if(flag==False):
    print("No")
else:
    print("Yes")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
if s == t:
    print('Yes')
    exit()
    
s_num=len(s)
for i in range(s_num):
    s = s[-1] + s[: s_num - 1]
    if s == t:
        print('Yes')
print('No')


Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
if s == t:
    print('Yes')
    exit()

s_num=len(s)
for i in range(s_num):
    s = s[-1] + s[: s_num - 1]
    if s == t:
        print('Yes')
        exit()
print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
org = T
for i in T:
    T = T[1:] + T[0]
    if T == S:
        print('Yes')
    elif T == org:
        print('No')

Failing test case input:
aaaaabaaabaaaaba
aaabaaaaaaabaaaa

Expected output:
No


Actual output:
No
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
org = T
if S == T:
    print('Yes')
    exit()
    
for i in T:
    T = T[1:] + T[0]
    if T == S:
        print('Yes')
        exit()
    elif T == org:
        print('No')
        exit()
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
T=input()

for i in range(len(S)):
    S=S[-1]+S[:-1]
    if T==S:
        print('Yes')
        exit()
    print(S)
print('No')

Failing test case input:
jzqso
m{nup

Expected output:
No


Actual output:
ojzqs
sojzq
qsojz
zqsoj
jzqso
No


Fixed submission (verdict: Accepted):
import sys
S=input()
T=input()

for i in range(len(S)):
    S=S[-1]+S[:-1]
    if T==S:
        print('Yes')
        sys.exit()

print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()
ans=0
for i in range(0,len(s)):
    a=s[i:]
    b=s[:i]
    ss=a+b
    print(ss)
    if ss == t:
        ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")

Failing test case input:
osqzj
lmt{p

Expected output:
No


Actual output:
osqzj
sqzjo
qzjos
zjosq
josqz
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
ans=0
for i in range(0,len(s)):
    a=s[i:]
    b=s[:i]
    ss=a+b
    
    if ss == t:
        ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = list(iss())
    T = list(iss())
    for s in S:
        if s not in T:
            print('No')
            exit()

    print('Yes')


if __name__ == '__main__':
    main()


Failing test case input:
aaaaabaaabaaabba
aaabaaaaaaabaaba

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = iss()
    T = iss()
    
    print('Yes' if S in T*2 else 'No')


if __name__ == '__main__':
    main()

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ans = []
a,b = input(),input()
for _ in range(len(a)):
    st =  a[(len(a)-1)-_:]+a[:((len(a)-1)-_)]
    ans.append(st)
print("Yes"if b in ans else "NO")

Failing test case input:
dba
bar

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
ans = []
a,b = input(),input()
for _ in range(len(a)):
    st =  a[(len(a)-1)-_:]+a[:((len(a)-1)-_)]
    ans.append(st)
print("Yes"if b in ans else "No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(s,t):
    for i in range(len(s)-1,0,-1):
        f = s[i:] + s[:i]
        if(f == t):
            return "Yes"
    return "No"

s = input()
t = input()
print(solve(s,t))

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
def solve(s,t):
    if(s == t):
        return "Yes"
    for i in range(len(s)-1,0,-1):
        f = s[i:] + s[:i]
        if(f == t):
            return "Yes"
    return "No"

s = input()
t = input()
print(solve(s,t))

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
a = ""
for i in range(len(S)):
    a += (S[-1] + S[:-1])
    if a == T:
        print("Yes")
else:
    print("No")


Failing test case input:
kyoto
tokyo

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
a = ""
for i in range(len(S)+1):
    if i == 0:
        a = (S[-1] + S[:-1])
    else:
        a = a[-1] + a[:-1]
    if a == T:
        print("Yes")
        break
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

for i in range(1, len(S)):
    if S[-i:] + S[:-i] == T:
        print('Yes')
        exit()
print('No')

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()

for i in range(len(S)):
    if S[-i:] + S[:-i] == T:
        print('Yes')
        exit()
print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

for i in range(1, len(S)):
    print(S[-i:] + S[:-i])
    if S[-i:] + S[:-i] == T:
        print('Yes')
        exit()
print('No')

Failing test case input:
bbd
sab

Expected output:
No


Actual output:
dbb
bdb
No


Fixed submission (verdict: Accepted):
S = input()
T = input()

for i in range(len(S)):
    if S[-i:] + S[:-i] == T:
        print('Yes')
        exit()
print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def count_substr(s1, s2):
    s2_length = len(s2)
    for i in range(s2_length):
        substr = s2[0:(s2_length - i)]
        if s1.endswith(substr):
            return (len(substr))
    return 0



s = input()
t = input()


match_count = count_substr(s, t)

is_match = False

if match_count > 0:
    
    s = s[match_count+1:len(s)] + s[0:match_count+1]
    is_match = (s == t)


print("Yes" if is_match else "No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

def count_substr(s1, s2):
    s2_length = len(s2)
    for i in range(s2_length):
        substr = s2[0:(s2_length - i)]
        if s1.endswith(substr):
            return (len(substr))
    return 0


s = input()
t = input()


match_count = count_substr(s, t)

is_match = False

if match_count > 0:
    
    slice  = len(s) - match_count
    s = s[slice:] + s[0:slice]
    is_match = (s == t)


print("Yes" if is_match else "No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

for i in range(len(S) - 1, -1, -1):
    if S[i:] + S[:i] == T:
        print('yes')
        break
else:
    print('no')

Failing test case input:
abc
arc

Expected output:
No

Actual output:
no


Fixed submission (verdict: Accepted):
S = input()
T = input()

for i in range(len(S) - 1, -1, -1):
    if S[i:] + S[:i] == T:
        print('Yes')
        break
else:
    print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s,t=open(0);print(" YNeos"[t in[s[i:-1]+s[:i]for i in range(99)]::2])

Failing test case input:
kyoto
tokyo

Expected output:
Yes

Actual output:
 No


Fixed submission (verdict: Accepted):
s,t=open(0);print(" YNeos"[t[:-1]in[s[i:-1]+s[:i]for i in range(99)]::2])

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

if S == T:
    print('Yes')
l = len(S)
L = list(S)
for i in range(l):
    a = L[0]
    del L[0]
    L.append(a)
    s = ''.join(L)
    if s == T:
        print('Yes')
        break
else:
    print('No')

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
Yes
Yes


Fixed submission (verdict: Accepted):
S = input()
T = input()

if S == T:
    print('Yes')
else:
    l = len(S)
    L = list(S)
    for i in range(l):
        a = L[0]
        del L[0]
        L.append(a)
        s = ''.join(L)
        if s == T:
            print('Yes')
            break
    else:
        print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s1,s2 =input(),input()
for i in range(len(s1)):
    if(i==0):
        if(s1==s2):
            print("Yes")
            break
    if(s1[i:]+s1[:i-1] == s2):
        print("Yes")
        break
else:
    print("No")

Failing test case input:
kyoto
tokyo

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s1,s2 =input(),input()
for i in range(len(s1)):
    if(i==0):
        if(s1==s2):
            print("Yes")
            break
    if(s1[i:]+s1[:i] == s2):
        print("Yes")
        break
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
t=input()
for i in range(len(s)):
    s=s[-1]+s[:-1]
    if s==t:
        print("Yes")
        break
else:
    print("NO")

Failing test case input:
kzqso
quzmn

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
s=input()
t=input()
for i in range(len(s)):
    s=s[-1]+s[:-1]
    if s==t:
        print("Yes")
        break
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def rotate(i):
  return S[i+1:] + S[:i+1]

S = input()
T = input()

for i in range(len(S)):
  if T == rotate(i):
    print("Yes", i)
    exit()

print("No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
Yes 10


Fixed submission (verdict: Accepted):
def rotate(i):
  return S[i+1:] + S[:i+1]

S = input()
T = input()

for i in range(len(S)):
  if T == rotate(i):
    print("Yes")
    exit()

print("No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s=list(input())
t=list(input())

if s==t:
    print('Yes')
    exit()
for i in range(len(s)):
    s.insert(0,s[-1])
    del s[-1]
    if s==t:
        print('Yes')
        break
        exit()
print('No')
        
    

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):

s=list(input())
t=list(input())

if s==t:
    print('Yes')
    exit()

for _ in range(len(s)):
    s.insert(0,s[-1])
    del s[-1]
    if s==t:
        print('Yes')
        exit()
print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s = str(input())
t = str(input())

slen = len(s)
tlen = len(t)

if slen != tlen:
    print("No")

for i in range(slen):
    if s == t:
        print("Yes")
        break
    s = s[-1] + s[:-1]

if s == t:
    print("Yes")
else:
    print("No")


Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
Yes
Yes


Fixed submission (verdict: Accepted):

s = str(input())
t = str(input())

slen = len(s)
tlen = len(t)

if slen != tlen:
    print("No")

for i in range(slen):
    if s == t:
        print("Yes")
        break
    s = s[-1] + s[:-1]

if s != t:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = str(input())
b = str(input())
check = 0
for i in range(len(a)):
  if a == b:
    check = 1
    break
  else:
    a = a[len(a)-1] + a[0:len(a)]
    
if check == 0:
  print("No")
else:
  print("Yes")
    
  
  

Failing test case input:
kyoto
tokyo

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a = str(input())
b = str(input())
check = 0
for i in range(len(a)):
  if a == b:
    check = 1
    break
  else:
    a = a[len(a)-1] + a[0:len(a)-1]
    
if check == 0:
  print("No")
else:
  print("Yes")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def B():
    s1 = input()
    s2 = input()
    
    YES = 'Yes'
    NO = 'No'
    
    s1list = [a for a in s1]
    s2list = [a for a in s2]
    s1list.sort()
    s2list.sort()
    
    result = YES
    for(a1,a2) in zip(s1list,s2list):
        print(a1 is a2)
            
    print(result)

if __name__ =='__main__':
    B()

Failing test case input:
osqzj
lnt{p

Expected output:
No


Actual output:
False
False
False
False
False
Yes


Fixed submission (verdict: Accepted):
def B():
    s1 = input()
    s2 = input()
    
    YES = 'Yes'
    NO = 'No'
    
    result = NO
    for i in range(len(s1)):
        p = s1[i:] + s1[:i]
        if(p in s2):
            result = YES
    
    print(result)
        
if __name__ =='__main__':
    B()
Problem: p03293
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = input()
t = input()
l = len(s) - 1
for i in range(l):
    s = s[-1] + s[:-1]
    if s == t:
        ans = 'Yes'
        print(ans)
        exit()
print('No')


Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
t = input()
l = len(s)
for i in range(l):
    s = s[-1] + s[:-1]
    if s == t:
        ans = 'Yes'
        print(ans)
        exit()
print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
flag = False
for i in range(len(S)+1):
    if(S==T):
        print("Yes")
        flag = True
    S = S[-1:] + S[:-1]
if flag == False:
    print("No")


Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
Yes
Yes


Fixed submission (verdict: Accepted):
S = input()
T = input()
sc = S
flag = False
for i in range(len(sc)):
    if(sc==T and flag==False):
        print("Yes")
        flag = True
    tmp1 = sc[-1:]
    tmp2 = sc[:-1]
    
    
    sc = tmp1 + tmp2
if flag == False:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = list(input())

for i in range(len(s)):
    s.insert(0, s[-1])
    s.remove(s[-1])
    if s == t:
        print("Yes")
        break
    elif i == len(s)-1:
        print("No")


Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
s = list(input())
t = list(input())

for i in range(len(s)):
    s.insert(0, s[-1])
    del s[-1]
    if s == t:
        print("Yes")
        break
    elif i == len(s)-1:
        print("No")

Problem: p03293
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
T = input()
try:
    j = T.index(S[0])
    for i in range(len(S)):
        if S[i] != T[(j+i)%len(S)]:
            print("No")
            break
    else:
        print("Yes")
except:
    print("No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
T = input()
pos = False
i = -1
while True:
    try:
        i = T.index(S[0], i+1)
        if T[i:] + T[:i] == S:
            print("Yes")
            break
    except:
        print("No")
        break

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

str = input()
str2 = input()

str3 = str2*2

if str3.find(str):
    print('Yes')
else:
    print('No')


Failing test case input:
kzqsp
quzmn

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

str = input()
str2 = input()

str3 = str2*2

if str3.find(str) > -1:
    print('Yes')
else:
    print('No')
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
        run()

def run():
        word = input()
        word = list(word)
        target = input()
        isSame = False
        for _ in range(len(word)):
                word_string = "".join(word)
                print(word_string)
                if word_string == target:
                        isSame = True
                        break
                rotate_char = word.pop(0)
                word.append(rotate_char)
        if isSame:
                print("Yes")
        else:
                print("No")

if __name__ == "__main__":
        main()

Failing test case input:
bbd
sab

Expected output:
No


Actual output:
bbd
bdb
dbb
No


Fixed submission (verdict: Accepted):
def main():
        run()

def run():
        word = input()
        word = list(word)
        target = input()
        isSame = False
        for _ in range(len(word)):
                word_string = "".join(word)
                if word_string == target:
                        isSame = True
                        break
                rotate_char = word.pop(0)
                word.append(rotate_char)
        if isSame:
                print("Yes")
        else:
                print("No")

if __name__ == "__main__":
        main()

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()

if len(S)%2==0:
    if T == S[::-1]:
        print("Yes")
    else:
        print("No")
else:
    if T == S[::-1]:
        print("No")
    else:
        print("Yes")
        

Failing test case input:
cba
arc

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
T = input()
a = ""
for i in range(len(S)+1):
    if i == 0:
        a = (S[-1] + S[:-1])
    else:
        a = a[-1] + a[:-1]
    if a == T:
        print("Yes")
        break
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())
T = list(input())
N = len(S)

for i in range(N-1):
    R = S.copy()

    for j in range(N):
        if j == N-1:
            S[0] = R[N-1]
        else:
            S[j+1] = R[j]

    if T == S:
        print("Yes")
        exit()

print("No")

Failing test case input:
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = list(input())
T = list(input())
N = len(S)

for i in range(N):
    R = S.copy()

    for j in range(N):
        if j == N-1:
            S[0] = R[N-1]
        else:
            S[j+1] = R[j]

    if T == S:
        print("Yes")
        exit()

print("No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
T = input()
L = len(S)
St = []
Tr = []
ans = 'no'
for i in range(L):
    St.append(S[i:i+1])
    Tr.append(T[i:i+1])
print(St)
for i in range(L):
    if St == Tr:
        ans = 'yes'
    else:
        St.insert(0,St[L-1])
        St.remove(St[L-1])

print(ans)



Failing test case input:
kyoto
tnkyo

Expected output:
No


Actual output:
['k', 'y', 'o', 't', 'o']
no


Fixed submission (verdict: Accepted):
S = input()
T = input()
L = len(S)
St = []
Tr = []
ans = 'No'
for i in range(L):
    St.append(S[i:i+1])
    Tr.append(T[i:i+1])

for i in range(L):
    if St == Tr:
        ans = 'Yes'
        break
    else:
        St.insert(0,St[L-1])
        del St[L]

print(ans)

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
t=input()
f=False
for i in range(len(t)):
  if s==t[i:]+t[:i]:
    print("Yes")
    break
  if i==len(t):
    print("No")

Failing test case input:
bbd
sab

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
s=input()
t=input()
f=False
for i in range(len(t)):
  if s==t[i:]+t[:i]:
    f=True
    break
if f:
  print("Yes")
else:
  print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
t = input()
flag = False
for i in range(len(s)-1):
    if "".join(s) == t:
        flag = True
        break
    else:
        flag = False
    w = s[0]
    for j in range(len(s)-1):
        s[j] = s[j+1]
    s[-1] = w
    print(s)
if flag:
    print("Yes")
else:
    print("No")

Failing test case input:
jzqso
n{mup

Expected output:
No


Actual output:
['z', 'q', 's', 'o', 'j']
['q', 's', 'o', 'j', 'z']
['s', 'o', 'j', 'z', 'q']
['o', 'j', 'z', 'q', 's']
No


Fixed submission (verdict: Accepted):
s = list(input())
t = input()
flag = False
for i in range(len(s)):
    if "".join(s) == t:
        flag = True
        break
    else:
        flag = False
    w = s[0]
    for j in range(len(s)-1):
        s[j] = s[j+1]
    s[-1] = w
if flag:
    print("Yes")
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
for i in range(101):
  if a == b:
    print("Yes")
  a = a[-1]+a[:-2]
else:
  print("No")
  

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a = input()
b = input()
for i in range(101):
    if a == b:
        print("Yes")
        break
    a = a[-1]+a[:-1]
else:
    print("No")
Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s, t = (input() for _ in range(2))
tmp = t
if s == tmp:
  print('Yes')
  exit()
if set(s) == set(t):
  for i in range(len(s)):
    tmp = tmp[-1] + tmp[:-1]
    if tmp == t:
      print('Yes')
      exit()
print('No')

Failing test case input:
aaaaaabaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s, t = (input() for _ in range(2))
tmp = s
if tmp == t:
  print('Yes')
  exit()
if set(s) == set(t):
  for i in range(len(s)):
    tmp = tmp[-1] + tmp[:-1]
    if tmp == t:
      print('Yes')
      exit()
print('No')

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


s = input()
test = input()

for i in range(len(s)):
    s_right = s[i:]
    s_left = s[:i]

    s_rot = s_right + s_left
    
    print(s_rot)

    if s_rot == test:
        print("Yes")
        break
else:
    print("No")

Failing test case input:
kypso
kmtyn

Expected output:
No


Actual output:
kypso
ypsok
psoky
sokyp
okyps
No


Fixed submission (verdict: Accepted):


s = input()
test = input()

for i in range(len(s)):
    s_right = s[i:]
    s_left = s[:i]

    s_rot = s_right + s_left
    
    

    if s_rot == test:
        print("Yes")
        break
else:
    print("No")

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
t = input()


def rotation(s):
    for x in range(len(s)):
        s = s[-1] + s[:-1]
        if s == t:
            return "YES"
    return "NO"

print(rotation(s))

Failing test case input:
aaaaaaaaaaaaaaab
aaaabaaaaaaaaaaa

Expected output:
Yes


Actual output:
YES


Fixed submission (verdict: Accepted):
s = input()
t = input()


def rotation(s):
    for x in range(len(s)):
        s = s[-1] + s[:-1]
        if s == t:
            return "Yes"
    return "No"

print(rotation(s))

Problem: p03293
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = input()
y = input()

for i in range(len(x)):
  if x[i:] + x[:i] == y:
    print('Yes')
  else:
    print('No')

Failing test case input:
aba`cbaaa`ba_aba
aaaba_`bbaaaaab`

Expected output:
No


Actual output:
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
x = input()
y = input()
b = 0
for i in range(len(x)):
  if x[i:] + x[:i] == y:
    b=1
    break


if b == 1:
  print('Yes')
else:
  print('No')