def rotations(str1, str2):
size1 = len(str1)
size2 = len(str2)
if size1 != size2:
return 0
print(str1 + str1)
if ((str1 + str1).count(str2) > 0):
return 1
else:
return 0
str1 = "abcxd"
str2 = "cxdab"
if rotations(str1, str2):
print("yes")
else:
print("no")
'''
run:
abcxdabcxd
yes
'''