Circular Strings

Given two strings A and B, find out whether one of them is one of the possible rotations of the other string. First line takes an input T which tells the number of test cases. Each of the next T lines takes 2 space separated strings A and B. Output T lines where 'i'th line prints true if one of the strings is a possible rotation of the other string. Else, print false.

IN

100
MtlqI lqIMt
J VJMUYh
ZaAaMIsaT taElYSEk
nwo won
LhHGgqqf RfFb
h rcxx
wpS wpS
HEoEzB hJtxab
t y
IFt FtI
RYyPnSX ABde
ErJonJQoZ WZHhhDIrWH
LwjI ILwj
jopLTHXJwG Kh
i VpQaYhWh
HDjpP HDjpP
dioyr JN
KxAY jwxZw
IteIak IteIak
B ugvkFp
QcqdcRbkCZ CwJMrp
Tz zT
aE h
uoQseT JxbnHEmsI
buBrTvskk TvskkbuBr
ucSPSIJyd iAVvJzjc
uFdVWXSphF yZO
q q
ZGgTOiqLS VwyR
doAC PmMBKn
CEVEDBKY DBKYCEVE
ofnFaJ RmJgMl
BxdcJSrNwO CScAmxr
KWUVCniNVU KWUVCniNVU
YAp jiUzgkRIE
LQvcKf EDcRL
NF NF
fsRI BCCHoVSvTD
ohxVHD mXLDm
XNYR YRXN
VHKZRBx WS
Jgx DeKESH
wTiVHJNN NwTiVHJN
XaL diB
apII rOscsNljj
UGQD DUGQ
SDcu sxZTwCKHkY
ATCSGqE Xy
pbTuvw wpbTuv
nTPnNOPZv YV
tyw Oa
nyr rny
kaxjZP TEJiUah
CHlgClCdBD qDPuFBuEKW
hr rh
zuVilxs DwjHAmk
Cq WxQ
bAPWjg gbAPWj
hrZRfwjdB PiIbVhE
wA OtN
i i
Q GXcFPhD
kGIZOSb ahYYHK
DxeLkGC kGCDxeL
bvRQCWToC orWReyYFwh
KKpqYzXA jdPDwTz
icsYVQrZoR oRicsYVQrZ
Y yJLPHMoJh
My iUcZceU
ZKvABmfpk mfpkZKvAB
TOH AVLjUaI
iCzKgDEk QFETRlj
obxEIbff fobxEIbf
ZpyYZax ICnSiGxN
oAISrlpVTq Y
tAwt tAwt
uyfcaVVjB y
j lbt
SpSKt SpSKt
oSoITKc sGTPdcqYcS
fFmyEG wqJq
XjZhElL LXjZhEl
sO XtMxXhgcM
B AQoRzhB
qcgwQSrVMH MHqcgwQSrV
aeJY rCYmdQMUHf
qjUiNDEDvV JCRUfVDFJV
jhlBvHKB jhlBvHKB
mZiZe DbHEKMX
tuiAdFH o
OJbyMgzYH byMgzYHOJ
LWdMfHY gCMAmm
t sHsgrWhdc
Elrey reyEl
kt KMw
b bPcuN
EgdVcMAGUG VcMAGUGEgd
K bt
uJ JHzm
cbiZP biZPc

OUT

true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true

IN

100
UGzXx I
pSY VxpFfC
eWmE KuBCWGr
msplJYJAQ splJYJAQm
njASQEkU YaI
uLNSreIfY rHyChQM
dVWyn khC
hlV Vhl
I Qohxm
OwfrfV CA
yAqBmadX QSlpcK
SReeyvcfoK yvcfoKSRee
mc KfrNrrtoa
IO majeRQLpN
Wbxywl xyhqlbj
RLq LqR
So EtSW
JJtFKtd EIHcPzQ
IWkuOmvHA NvRJzBsvIE
oOwWw wWwoO
VRGgNQcCEZ eYaAQJ
TDydhO xlnTmdrF
Zsbb FaJJBJLTU
oxnrgEJEPy rgEJEPyoxn
BSiM cNub
XKcyWpr eFQsyyW
cniEslwcYQ LkHehsIhQ
aiEF EFai
GZupDHxhB gDLyHY
REs mbBMcJSj
OPLKfQT A
pGX XpG
gBQXf IUMjGOv
XhO uaSkTWKn
SMqySRR XZaRnMZbJ
ZspMMpgy MpgyZspM
L sflJgd
Xvx YQMKPNtqM
FaZUgx LKddQoMWU
TROrPFdbWt PFdbWtTROr
fHSIip ivDSz
IpVEjmZDbr GWWepSr
ckhk xswD
xkvN kvNx
yUBbxuWFT JKmbjQNqb
q kTIIFG
OKvkNZHKxm RyPFbZwORZ
h h
afyhnXW VgmUOW
CbKCRR snrjmXrJOT
ObD zcHFodVNy
OKC KCO
IzrB Dz
O veDYjpZl
hcd rBEHN
Pp pP
GSzLr AgBEKzOB
BCif kwJrew
vnrlTLn FQ
LrNXtBzuFb NXtBzuFbLr
iohthls iF
tbM irZrE
eCliDhN lxQcEkjre
zJTv zJTv
DWyC dvUhicKS
sdmiHtUR YKMkfhw
mVLPKq E
UiJMXDsMMZ ZUiJMXDsMM
QThchri NvdIISVZg
Ya kph
jvbick yrfFInwX
biTvduB vduBbiT
d eUwudRX
wJpUaubkk KuauPvxj
deCsKwOGA EoDnfZ
z z
l miDGXAF
ZJpdbB riByor
B DTygw
JItmRT RTJItm
enH qkws
EvCu gWLl
LsNXbwqPPL NPrX
jJJBl JJBlj
NkmvgzGx YliBja
AMW dP
qYwZcjOBy pTGOzGBat
Be Be
EYqtDfI FGSHrjKPJB
SqJyRlR NVpJbP
WUGEOl i
dTHuDj dTHuDj
bovuzOZO QxmF
iAg QUDYRHuy
XjiUkw hx
gOQXNE gOQXNE
ogufWoJxf RgT
pbkcZbj GppYOc
vqQ LWaZFZHxsN
Icwue eIcwu

OUT

false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true
false
false
false
true

IN

100
ZsMOOtzXWVAypfmVTmhFnCTyvCywfVkenyuDRUdqrfOiMCdGOklcpeAKHZJowTsKsNPLjSbcYrkKToqIy WVAypfmVTmhFnCTyvCywfVkenyuDRUdqrfOiMCdGOklcpeAKHZJowTsKsNPLjSbcYrkKToqIyZsMOOtzX
NiMarnJFKCzWwOLiX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ddVwxefkcPvgMVVkKjtfHXxWcTtpSecViXrFDwPFlMLAHHKTKANWiG
ZZDwVFRpUJVyEdvxJYUafHpshyBusTZrTCpqhIhDrdbxgYwrWqUDAjWjHZDZTfqoHhErPMUIryfxwertulyw WibWnDPsTFaDjTsxNbOlImIMfDJqDHKAPnYdQpvmUXPdQJBgKRTVddHKGSaMAmOpAMUSbqGVPvAGf
orvhOalwLtQnfqATiChcuiUbFKYISFlgzi nLClwWclDULxcPEHMpBpwNnehvSPwCFJnhVlFzxjtKGYAMFmDIBawqefnyVJbAVQjscPRzYMLgKluRZYccAatg
iFauiApYmHababBoNjZADsAduCDuxmAGRcCBDRzracsaFvoUEPvJKxpGBubZGdhxHJAkcadcEXcLsSGyID EXcLsSGyIDiFauiApYmHababBoNjZADsAduCDuxmAGRcCBDRzracsaFvoUEPvJKxpGBubZGdhxHJAkcadc
CZYdtBEagLZOWAAYcECGBETwxzwHEgBgfzMzDqzlEyZAYcbaGDiJKcHJdeSkktqqucrXVQjzQKZPMCrUIcgUGpDltvvgqoY SpINftmVdOmsSgOciUWqkbBfwzlMpjZhyHxfClbhZPzuVowFKtxUuBataNHpzGYXP
FrHGziXACTOBazUyVQZxjBltsKZSjPoOIxWhhU KpYlRZHRxxsUjTHCNTdGdSU
dTqMaMWmbxZuYimvGEqryzTNtWtwrPPWIHIltFxWcZrChDYNhQGhpbVIYoeRewNodvzxCztg hDYNhQGhpbVIYoeRewNodvzxCztgdTqMaMWmbxZuYimvGEqryzTNtWtwrPPWIHIltFxWcZrC
JFnHVXZBeoDZXdoDwUZLi IkclJXTJkeoZLLWmnbBsayXQbtKDGvioFMzQlVzvZpvnbrzQUaKVaHLECYhitRwYfyqq
PMseJhHaHxVjhskqFOSDxaWoZwVxolsdzmKiurLDriMyAWPfmjlJMJzLIuKWicCHomQkfBNwJAVLYmslvDwh WuxSetaIVIzJyJPBZlkbIxZUPMStjBKHyhzCcclAmKjKVYNUMzVuWxRLjlGUMq
kZDpchcCtMnFjmseY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onjhGRPqHaswPDURDofb TuAjxSXinExcNglExdOywknBeeGUMkFFEfPbXojMviPKQapoFFobPBevhLpvVVDbCscAiNmDyDooffeLKUozvV
fiLcdGFGjXIlIXZlXfzOkgSxQNoRKLn XfzOkgSxQNoRKLnfiLcdGFGjXIlIXZl
ZuyhZeSzodhNdULiWzUcTUvGKOTvEkofgMmIsfhGKQtpmGZifUNZqihayaXcNlJvzWdtDMZPeUfrBeziAm sWpsvRRZ
cJCdhhw UXbAugRxNTFnHpiEEABXUceyLiCupAGLyIOuqFRFaYvIn
OtFprzTXYhHAByCikCsYWkfpQIolqBOeVtVOvOntVUvxsXhecbEYlKQDseOkheQEaLsvbFOXzjWuIF QIolqBOeVtVOvOntVUvxsXhecbEYlKQDseOkheQEaLsvbFOXzjWuIFOtFprzTXYhHAByCikCsYWkfp
GdltpbXjHntOsjtswnpxTdWUOSoYZplFswBjZysGn WFYpzufOtYtquJKlIKATRuRsDssVYGiwNIoPctDvTzLniwasIANzUgSxyMUYsEvImlxQECmxbzmMxnGfpWhMcBLdnG
ikYQZLPPprDoVFdjESrmhntvSUhVhNyRzZjaKYQCSVsNAvyHPPTXFmUZIb rqUjQvsQIrikLGCagAyppPiOWuJVcmruDOftjxLtqwDDcIDKKDaZtiqpfZNJleFqSKJEKXXCtdgXLJjXnjWiUOZBpMkBtsRNEdr
CRtxUbuhmDebpCjjrLKGZwJUOdItIBjkseHOfDxsIBVXGfIzsUfTrrOHWYCEzoquszKycismlnMRUWSORAIKRYT rLKGZwJUOdItIBjkseHOfDxsIBVXGfIzsUfTrrOHWYCEzoquszKycismlnMRUWSORAIKRYTCRtxUbuhmDebpCjj
wTvKjrcIccmkWaXMMPiJHXchhoAfhPbDkwPtquDsw eVsbHGsPRCoTlvhMApdBuoAkjQgpKe
OZArihKYYOOuZkBnKsTOphobSGhhSlqGlQztzLTazkubuVoGQ ufQkglsPskaksNbuJcfechowiIUYRKgNryYZJSOEdOOX
rrNux rrNux
ggvoqpmhBUVSVvREPh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bQmsMkpFOTTUuFTPskXIybkjtdsRTqNVgZPSjGyz
aoNjIQdzmuOhANyVz tAFOwDmmTg
gIOuXXcqbdCvRlxhJsGOngVbfbnrUVHagvudsZVVcxqwkqDUILkWtgXyJNrDkYDqtzuoy jdpc
zscVCNgagOAhZPyCZZHqsgmihBsMsWluoPpseXVMnvTmkUqLTXbNGnWprQblMO seXVMnvTmkUqLTXbNGnWprQblMOzscVCNgagOAhZPyCZZHqsgmihBsMsWluoPp
DxUjWrVkMrYylpkeONtWbplUfOftCLVHKsQGJMsYdrwQiiwWWPvXHGtovyIXLDhvxXEhJWfoPdezmcYiStHzZaNWa wMdDJAAnjMMoCdUjDglBQd
xevZusZrqnuTXxVMGjyxMCrVfxIiPoEOsZNoToGjCCEbBApiJOFvSWSzVBHmPlaJMNY DgPHkuIMwYwfobdIzxhWAqiRdidrxDXalpkvlSJjsfoiITQJTzFVrpNWZQowtlZgcjBPDNYyuPGFIZodawZsLMoneCJZq
fUtiKzV tiKzVfU
SxfxIennfJmZXAPkgUvfkGMGBVqasBXkAdjKJxYOIkpFnfrtZNbLVNTwIkxDnWpNZzyJyY giRoXWhrxUsKrfDOqpNTCJiSljSw
QvqAmEyKLrJiltzqXPimebrOMLBVfXfxUvXJBXVmoFWbYYUxpcmuGfKsQlPxKU EpRPQrLFhqdjobdoTfAnnFXFXKXuWRoAJfqbYDigTmpJPsXIZxxncWuZirteLjhuRZXPCgVvUMelecUGzTTeQnFYhBdSKMOBLLr
tOIPBMbhqVNQqiwgYbHfem MbhqVNQqiwgYbHfemtOIPB
YPSJcLWwAElDSOmjJCBaKXIkApRFBqWbHO KAGICMvfFkrOv
pXgOGqoxivBarCkIPUKvem zTNlkdjGsgogoEWoosPRlTbvIxfGBrOCM
OzgXfaFtIUzE IUzEOzgXfaFt

OUT

true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
false
false
true
Login to submit solution


20 symbols pyth
Mon Sep 19 20:21:25 2016 Sait2000
VQAcwdr`&}G+HHqlGlH0
41 symbols perl
Sat Oct 24 02:43:11 2015 vakorol
#!/usr/bin/perl -pl
$_=/ /?/^(.*)(.+) \2\1$/?true:false:""
42 symbols perl
Fri Oct 23 16:53:20 2015 danieljabailey
#!/usr/bin/perl -pl
$_=$n++?/^(.*)(.+) \2\1$/?true:false:""
44 symbols perl
Fri Oct 23 16:52:16 2015 danieljabailey
#!/usr/bin/perl -nl
print/^(.*)(.+) \2\1$/?true:"false"if$.-1
46 symbols perl
Fri Oct 23 01:13:05 2015 vakorol
#!/usr/bin/perl -pl
$_=$n++?/^(.*)(.+) \2\1$/?"true":"false":""
50 symbols perl
Fri Oct 9 22:43:42 2015 danieljabailey
#!/usr/bin/perl -lp
$_=/(.+) (.+)/?($2x3)=~/$1$1/?"true":"false":""
51 symbols perl
Fri Oct 9 12:56:56 2015 danieljabailey
#!/usr/bin/perl -lp
$_=/(.+) (.+)/?($2 x3)=~/$1$1/?"true":"false":""
52 symbols perl
Fri Oct 9 12:52:03 2015 danieljabailey
#!/usr/bin/perl -p
$_=/(.+) (.+)/?($2 x3)=~/$1$1/?"true
":"false
":""
53 symbols perl
Fri Oct 9 12:50:47 2015 danieljabailey
#!/usr/bin/perl -p
$_=/(.+) (.+)/?"$2$2$2"=~/$1$1/?"true
":"false
":""
69 symbols perl
Thu Sep 24 23:46:06 2015 danieljabailey
#!/usr/bin/perl -p
$_=/(.+) (.+)/?length$1==length$2&&"$2$2"=~/$1/?"true
":"false
":""
69 symbols python2
Sat Jan 16 18:22:15 2016 Sait2000
for _ in[0]*input():a,b=raw_input().split();print`a*2 in b*3`.lower()
70 symbols perl
Wed Sep 23 23:02:08 2015 danieljabailey
#!/usr/bin/perl -n
print length$1==length$2&&"$2$2"=~/$1/?"true
":"false
"if/(.+) (.+)/
72 symbols python2
Sat Jan 16 18:15:44 2016 Sait2000
t=input()
while t:t-=1;a,b=raw_input().split();print`a*2 in b*3`.lower()
80 symbols python2
Fri Oct 9 15:25:25 2015 BogdanShevchenko
t=input()
while t:t-=1;a,b=raw_input().split();print("false","true")[a*2 in b*3]
82 symbols python2
Thu Oct 8 13:43:26 2015 BogdanShevchenko
t=input()
while t:t-=1;a,b=raw_input().split();print("false","true")[a+a in b+b+b]
83 symbols bash
Tue Aug 16 23:18:12 2016 hidefromkgb
b=`md5sum`;while((++i<101));do sed '/0/ctrue
cfalse'<<<$[${b:2:1}?(i-1)%3:i%4];done
85 symbols bash
Tue Aug 16 23:17:04 2016 hidefromkgb
b=`md5sum`;while((++i<101));do sed $'/0/ctrue\ncfalse'<<<$[${b:2:1}?(i-1)%3:i%4];done
88 symbols perl
Wed Sep 23 18:30:15 2015 dmitry-tiger
#!/usr/bin/perl -anl
print join("",sort$F[0]=~/(.)/g)eq join("",sort$F[1]=~/(.)/g)?"true":"false" if $#F;
91 symbols python2
Thu Oct 8 13:23:37 2015 BogdanShevchenko
t=input()
while t:t-=1;a,b=raw_input().split();print("false","true")[b in a+a and a in b+b]
95 symbols perl
Wed Sep 23 18:18:59 2015 dmitry-tiger
#!/usr/bin/perl -anl
next if$#F==0;print(join("",sort$F[0]=~/(.)/g)eq join("",sort$F[1]=~/(.)/g)?"true":"false")

View all solutions