QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#204307#2374. Cycle String?leovl48#TL 233ms51048kbC++202.8kb2023-10-07 09:35:222023-10-07 09:35:23

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3680kb

input:

cbbabcacbb

output:

YES
aabbbbbccc

result:

ok The contestant and jury found an answer

Test #2:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

aa

output:

NO

result:

ok Solution does not exist

Test #3:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

afedbc

output:

YES
abcdef

result:

ok The contestant and jury found an answer

Test #4:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

cghfbdae

output:

YES
abcdefgh

result:

ok The contestant and jury found an answer

Test #5:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

babcacca

output:

YES
aaabbccc

result:

ok The contestant and jury found an answer

Test #6:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

hfjeacbdgi

output:

YES
abcdefghij

result:

ok The contestant and jury found an answer

Test #7:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

fblcmcafgichjocodacanejmiaghclclmpnjcklkelhijghmgkhicdaafkgiaenjefkmmminihdfmiokjghdnohmddmgae

output:

YES
aaaaaaaabcccccccccddddddeeeeefffffggggggghhhhhhhhiiiiiiiijjjjjjkkkkkklllllmmmmmmmmmmnnnnnoooop

result:

ok The contestant and jury found an answer

Test #8:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

babaccacbcacacbcabbcacacbbbbabccbcbaabbbabcbbcacaaccbbbaaacacaccaacabaabaaaabaabbccabcaaacccccabbcbacabccbacabacaccbbabccccabbacccbaacacaccbacababcaccaccacacbaaccbcccaaacaabbacbcbbcccaaaacbbcccccccccaabbcabcbcacbccaababcaaccccaccbcbacaacbaacbbaacbaacbacaaaacaaacbbbaccbabcababaccacacccbcbbcccaaaababa...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbb...

result:

ok The contestant and jury found an answer

Test #9:

score: 0
Accepted
time: 1ms
memory: 4232kb

input:

ccfaehbdffhadecdgacahfgbbbgcccfhfdbafbadddcgcfdafccdcafhaggeaghchcdegbfcecbhdhefdahddaeadacbachgdcchdcfdbefbbdcadegbefghceehabcaggahfahcgdchdbfhhcdefaadafcgdcfefdhebddhfahehedeefhcbdedafdaggbgggeadecgeefafafedcfgeehbhefhdfgdbebadeefdhhdedbgdfeehfchhfeffdfffghhehfbfegacbehdehcdaadhfhgdbhcaghcccgdcgdd...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #10:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

ifeehacdbg

output:

YES
abcdeefghi

result:

ok The contestant and jury found an answer

Test #11:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

gwrffzdydmtyficvthjgseannpwxxkaqyrykfbziqszdirlwkqzsvwohmmcaudpyovcnfddsdvvytpdsal

output:

YES
aaaabcccddddddddefffffgghhiiijkkkllmmmnnnoopppqqqrrrssssstttuvvvvvwwwwxxyyyyyyzzzz

result:

ok The contestant and jury found an answer

Test #12:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

gbmfhaeabeleiagcllhiiifmchighalckkghajaihiagmclibehjbaegdajebjhfbidahblcbemcdmmjbcdbhbdfldljmffgcbkdmacmjccmbjjmjccbaiiaffegbblbhehfaljdedhmkhldefdhgfgeagdglijediihclkcklcaefdmedkffabfcaliheaiaiagaegejmmddkkedbigkmdammkhemllbckieefclhglhgeabgfffkijjemekmkjggdjehmidbjjjhljdmjkeijaigiffkhfehkekglcaeje...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccccccddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...

result:

ok The contestant and jury found an answer

Test #13:

score: 0
Accepted
time: 1ms
memory: 3956kb

input:

pangkaeejgcohrfranglmibbnmldpriqndrjbhqcfdibgjlhedbghhiqcbhafrcpchhdjfakqnikdgpqcghcknnqrgpjjdhnjhbjhljdoorojmfbrrlljmimqfdrojmfldpdmclafhkmidqhalnrikcgmqgcnihorfnbojmfrrflqkmgbpqbieeffjbphrekocrmjjjopojmqahpeqpfkpmhpriarlmgoqmmjhdbpoaaiggpppgnhlfckcndmmklafdpnkgrkrgfhcgfhogghcmiobhgpjeenffmgbjjbdca...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #14:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

output:

NO

result:

ok Solution does not exist

Test #15:

score: 0
Accepted
time: 6ms
memory: 6740kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

NO

result:

ok Solution does not exist

Test #16:

score: 0
Accepted
time: 40ms
memory: 15096kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

NO

result:

ok Solution does not exist

Test #17:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

baabba

output:

YES
aaabbb

result:

ok The contestant and jury found an answer

Test #18:

score: 0
Accepted
time: 0ms
memory: 3884kb

input:

aaabbaabbbabbaaabbbbbbbbabaaaaabbababaaaabaaaabbbaababbb

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbb

result:

ok The contestant and jury found an answer

Test #19:

score: 0
Accepted
time: 2ms
memory: 4244kb

input:

baabaaabaabaabbaaaababbababbababaaabbaabaaabaaaabbbaaabaabaaaabbbbaabbabbabbabaaababbabaabbabbbabaabbabbbbbbbbaaabbabbaaaaaaabaaaaaababaaabbaabbaabaaabaaabbabbbabaaaabbbabaaaaabaababaaabababaababababbbaabababbaaabbbbbaabaabababbaaaabaabbbaababbaabbbaababbbbaaaababbabababbbabbbbabaabaabaabbbbbabbabbb...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #20:

score: 0
Accepted
time: 21ms
memory: 10092kb

input:

bbbaaabbbaaabbaabababbababbbaaaababbbaaabaababaabbaaababbbabbbababbbbbabbabbabaaabbababababbaabaabbbabbababbaabbabaabbaabbbabaaaaabbabbbbbababaaaaabbbbbabaaabbaabaaabbababbabaaaaaaaaabbaabbaaababbabbaababbabbabbabbbaaaaaabbababbabbbbbaaaaabbbabbbbaaaaaaababbabaaaabaabbbbaaaaaababaabaababbbbbbabaabaa...

output:

YES
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

result:

ok The contestant and jury found an answer

Test #21:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

bbacaabbcaaacccbabcaacab

output:

YES
aaaaaaaaaabbbbbbbccccccc

result:

ok The contestant and jury found an answer

Test #22:

score: 0
Accepted
time: 4ms
memory: 4712kb

input:

bbabcaccabacccbbaababbbbbcbabbcacbcbacacacbbbcbbbcacccacaccbcaacbbbacaacaccbaabacaaabaaacabcaacacbbcbabaccacacccbacabbbbccacbaabcabacbbacbaabaaaabcccbaacabbccbaccbccacbcaccbcbacbbacaccaaaaabccabacabcbbacccabaccbaababbccbbbbababbbaaacbabaaaabbaaaaababcabbaaaaaaccacccbbaacbabbbcacbcabbbbacccbbbcaaabcc...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #23:

score: 0
Accepted
time: 179ms
memory: 48944kb

input:

cccccabccacabbabcaabcacabbbbcbbbabaccabcbbbcabababcabcbbaccbcbaaababccbaccaaacbbbcbccbcbbbabbbaabcabcaaaacbcccababbaccabacccabbaaabbcaccaacbcbccbbbacbbcccacbabbbcabacabcabcabcabbacbcaacaabccabbabbcaacaccbabccacaccababbaababaabbcabbbaaabaccbbcbcaaabccbaccbcbaabcabcbbbbbbbbabcbccbccaabaacaacbabbbcacac...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #24:

score: 0
Accepted
time: 74ms
memory: 17680kb

input:

eqkhnrkaytrgbwpmopavlpkakdveoyvwudwytxmgtwossflwskfiyqjstgykwbimitkefitjhyvgyswancnfrbuoqpqjjirfxarxybouwidptteqlckyrfnjucpjvpvnrykqykvxlcuyvxlyvvkqlsucsrdmscnswmefrkbmkdegvmeecmeutfquguosbgwdayyodcrqowjetqrjjydmnotedicfpmyoocbkqbdiiusinmvervloqrlwdkyhnvgakqheaejqfjfdchgohhjasgtkcpoyyfrflokjhptdwqjt...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #25:

score: 0
Accepted
time: 185ms
memory: 39832kb

input:

jiicbbaheebcidjgcaihedbichhaijgiahcijafdeegajgigeaaicifecggjiddgedbfcfcecedadgjeaihhffhbchecchdjgabgigaebfbdhdiiadgiaeaiiahhjiighcjfefgdgjibcifjgiiaafadeieaafjceebhhjbedeibhaejbeecdadhafifhcihhifdjbhjedhfjhafgbgbfgdeabccieibebicgcaicgcafjdicfbgefebagjdfbiihdcbdbajcgdddjfediaijdccjhefcgiecedfcfchcigh...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #26:

score: 0
Accepted
time: 29ms
memory: 9708kb

input:

pebefqcnesiqgkhobernbhgbbenppejlonforlpbqloosfefoiacelqiicgjslbrjlrrslrmmkeaqoensnpacaooblkqocqcqlifkrlrgoqarhnnphrcriphojijdqisdrbshnhiljhifpgppsmrccfppslopampejdssnrsfojsaanqaonlghnarhqdajfprreioepckooofjanipahplsoidnqjmfchhpipbhgqklhfrbaodakhgabodakpjaakhsfnjnpskoleffpsfllnbrgprclnjkhggsjmprasmcc...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #27:

score: 0
Accepted
time: 3ms
memory: 5440kb

input:

baabaaabbabbabbbabaaabbababbaaaaaaaababaabbbbaababaababbaabbbabbbbabbbabbabbbabaabbabbbaababaaaabbbaaaaaaaaaababbbabbabbaaaabaabbbbbabbbbbbbbabbbaaabbabbbbbabaabbbaabaabababbbabaababbaabbbbabbbbabaaaaabbbbababababbabbbbaaaabbbbaabbbabbbbbbbabbabbaabbbbbbaaaaabaaaabbbabbbbabbabaabbaaaabaabbbbbbbbbaab...

output:

YES
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

result:

ok The contestant and jury found an answer

Test #28:

score: 0
Accepted
time: 204ms
memory: 40572kb

input:

giiilhifbalmiceefhegdmfbkbhjdimijhfhbllkahekkdkcggadaeakdhmglmfjmibbgkbeeffgdaffbacmdeleldlihafcemfjgjmfjkjmdjgbidmjjcbfjkefkdjlahllkmiiegebmckjfchbgmiecdlcdmibejaekhkamffhciflfiaafbahcklelghleefchladcaacjkbkgambjijgfamgkjegfmbahikmjbcbcaliedgkjicfajmalmheddjfeaeflddcelgjfefddabgfgjmgkfaeeclkjdggdbl...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #29:

score: 0
Accepted
time: 57ms
memory: 15268kb

input:

eehihehiaegegieecagbbaeccicbhajjfagbfaegjafeadidaeefgeddejdgfecbejaijdccjbcggebdjgabhddibgaeidafhdfejgihjegebbdgajaebdgaeehbihiihjfjjacjhjaeidacgbejbjgigeheicbcejahhiibjcchiadigcfdbfgaedjadaefjfagbfagccejfbgaacejcdaihifidjhfaiijgajcfjaifhifbbhcegacdbbedfdigbgibaiiajagfdfcaabbffffiieijahifjhdgahgfige...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #30:

score: 0
Accepted
time: 17ms
memory: 8552kb

input:

abfedgdgafadeeaeadbeabdcdbfbbebdbgdddaeegeecebgcdgbcgefeadefgddbecedbcgacbbffdgefgbdaebfdaafdddcgecaagegdfgdafafcaadggdagdaeedagaegdcfdedcefggcgbedafbbcbdfbegfagcegdfggagdgfeagbbddcfcbbdbbaegdedfdagggbdafebfgacdefeabbdecbeaceeaebgeaaddegfaedbfgggaeecabfacadbcadgcgbcbefcdabbdbbcggafgadffadcaagebadecc...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #31:

score: 0
Accepted
time: 61ms
memory: 25204kb

input:

babbbabbaabbbbaaababaaaaabbaaaabaaaaaabbaaaaababbabbaabbbbaabbababbbbabbbaabaabbaaaaaaabaaaaaaabbabbababbababbabbbbaaaaaaaaabaaaaabbabaabbaabbaabbaaabbbbbbaabaaabbbbaabbabbabaaabbbaaabaabbaaabaaaabbbaabbbaaabaabaaababbaabababbbabaabbaabbbbaaaaababbabbaaabbbabaabbaabbbaaabababbbbbabbbbbbabbbaabbaabba...

output:

YES
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

result:

ok The contestant and jury found an answer

Test #32:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

abcabc

output:

YES
aabbcc

result:

ok The contestant and jury found an answer

Test #33:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

bc

output:

YES
bc

result:

ok The contestant and jury found an answer

Test #34:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

zbzz

output:

NO

result:

ok Solution does not exist

Test #35:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

zbbz

output:

YES
bbzz

result:

ok The contestant and jury found an answer

Test #36:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

aabbbb

output:

NO

result:

ok Solution does not exist

Test #37:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

aaabbbbb

output:

YES
bbbbaaba

result:

ok The contestant and jury found an answer

Test #38:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

aaabbb

output:

YES
aaabbb

result:

ok The contestant and jury found an answer

Test #39:

score: 0
Accepted
time: 9ms
memory: 6452kb

input:

aazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

NO

result:

ok Solution does not exist

Test #40:

score: 0
Accepted
time: 9ms
memory: 6492kb

input:

dzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

output:

NO

result:

ok Solution does not exist

Test #41:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

aaaabc

output:

YES
aaabac

result:

ok The contestant and jury found an answer

Test #42:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

aaaabcde

output:

YES
aaaabcde

result:

ok The contestant and jury found an answer

Test #43:

score: 0
Accepted
time: 233ms
memory: 50568kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #44:

score: 0
Accepted
time: 192ms
memory: 45080kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #45:

score: 0
Accepted
time: 222ms
memory: 51048kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #46:

score: 0
Accepted
time: 29ms
memory: 12980kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #47:

score: 0
Accepted
time: 0ms
memory: 4724kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #48:

score: 0
Accepted
time: 224ms
memory: 50936kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

YES
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok The contestant and jury found an answer

Test #49:

score: -100
Time Limit Exceeded

input:

abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...

output:


result: