1000 a aa aaa aaaa aaaaa aaaaaa aaaaaab aaaaab aaaaababb aaaaabccb aaaaacaca aaaaacbac aaaabab aaaabcabc aaaac aaaacaaccb aaaacac aaaacbc aaaacc aaaacccb aaab aaaba aaabaa aaabaabc aaabaac aaabaacc aaabb aaabbaaabc aaabbabc aaabbaca aaabbbaac aaabbca aaabbcaab aaabbcccc aaabcaba aaabcac aaabcaca aaabcbbccc aaac aaacaacc aaacab aaacb aaacbacaa aaacbbc aaacc aaaccca aab aaba aabaa aabaaabbba aabaabba aabaacabab aababca aababcc aabacaaba aabacbaca aabacbacac aabacbcc aabb aabbaaacba aabbaaacc aabbabac aabbac aabbacab aabbbacc aabbbbaa aabbc aabbca aabbcbcacc aabbcc aabc aabcaa aabcaccc aabcbbaaac aabcc aabccc aac aaca aacaab aacaabb aacaabccca aacaac aacaacac aacabbaabc aacabbacaa aacaccb aacb aacbaaaac aacbaccaab aacbb aacbbaa aacbbbbb aacbbcccbb aacbbccccb aacbc aacbcbab aacbcbca aacbccbacc aacc aacca aaccab aaccabb aaccaca aaccacbb aaccacbbba aaccb aaccbaacb aaccbb aaccbbacb aaccbcca aaccbcccb aacccabaaa aacccb aaccccbc ab aba abaa abaaa abaaaaccca abaaabbac abaaabcb abaaacbaab abaab abaaba abaabaccb abaabbb abaabca abaacbcaba abaacbcb abaaccac abaacccaac abab ababaaab ababaaca abababbcba abababcca ababac ababacacac ababbab ababbaba ababc ababca ababcabaab ababcc ababccccca abac abaca abacaa abacabcb abacacc abacb abacba abacbaaa abacbac abaccaaac abaccaca abacccccc abb abba abbaa abbaabcba abbaaccbaa abbabab abbabbba abbabbbaa abbabbbb abbacaccac abbacbbca abbacc abbb abbbaa abbbaaa abbbaabcc abbbbbbb abbbbbbc abbbbcc abbbbccc abbbca abbbcac abbbcba abbbcbb abbbccccca abbc abbcaac abbcabaca abbcb abbcbabccb abbcbc abbcc abc abca abcaabcbc abcab abcababcc abcabb abcabbaabc abcabbbbcb abcabcab abcabcbbb abcabcca abcacababb abcacbcab abcacbcc abcacc abcb abcba abcbaaaaa abcbabaaab abcbabaccc abcbabca abcbabcbbc abcbacbac abcbaccca abcbb abcbbcb abcbcb abcbcbab abcbccabb abcc abccaacbc abccab abccabbc abccaccca abccbaaacb abccbacc abccbb abccbbaa abccbca abccbcac abccbcc abccc abcccbbb abccccc ac aca acaa acaaa acaaaabbaa acaaacaacc acaaacba acaabb acaabcbaa acaacaaba acaacc acaaccb acaaccbaca acaaccbbb acab acabaa acabaaa acabaaacaa acabca acabcabc acabcbab acabcbc acabcccabc acac acaca acacaa acacaacab acacacbbc acacb acacbabaa acacbcbcb acacc acaccacc acacccaaba acacccc acb acba acbaa acbaaa acbaab acbaacc acbab acbabc acbabccac acbacbb acbb acbba acbbaabb acbbabcab acbbb acbbba acbbbaaaca acbbbc acbbc acbbcc acbbccac acbc acbcaab acbcabbc acbcabcacb acbcabcb acbcac acbcbb acbcbc acbcc acbccabab acbccabbb acbccabcb acbccbcbb acc acca accaac accac accaca accacaaabb accacc accaccccc accb accbac accbacabb accbb accbbaac accbbac accbbbaca accbbbc accbbcb accbbcccca accbcac acccabbb acccb acccbba acccbbab accccaaab accccabc accccb accccc accccca acccccb b ba baa baaa baaaabaa baaaac baaaacba baaabaa baaabbbb baaabcbcc baaac baaacbbc baababcb baabb baabbb baabbbc baabbcbcb baabbcc baabbccbb baabcac baabcacacc baabcca baabccac baac baacaaa baacabbaab baacac baacbacaba baacbb baacbc baacbcaaab baacbcaccb baacca bab babaaaa babaaac babaabbbc babaac bababaaccc bababab bababcabc babac babacaa babacab babacbac babacbb babacc babb babba babbac babbacc babbbb babbbbb babbbbccc babbcabbcb babbcbbaba babbcc babbccca babc babca babcaaaac babcabba babcabcac babcacb babcacccb babcbc babcca babccbbcb babcccc bac baca bacaaacbcb bacaab bacab bacabb bacabbac bacabbbcb bacacbaccc bacacbc bacaccbaa bacaccbacc bacb bacba bacbaa bacbaaaba bacbaaac bacbaabbba bacbaacba bacbaacbcb bacbab bacbabbc bacbaccab bacbbacb bacbbbac bacbbbbcb bacbbbcc bacbbc bacbbcabca bacbbcacaa bacbcc baccaa baccaaa baccaaab baccac baccca bacccaca bacccacba baccccbccb bb bba bbaa bbaaa bbaaaab bbaaabcc bbaaac bbaaacac bbaabbccb bbaabc bbaacac bbaacacbbc bbaacc bbab bbabaaa bbabaabbca bbababc bbabac bbabacba bbabacca bbabb bbabbac bbabbacba bbabbbbcbb bbabbcca bbabcac bbabcc bbabccbc bbac bbacaacb bbacab bbacaba bbacabb bbacabba bbacacabb bbacacb bbacba bbacbaac bbacbcccac bbaccacab bbb bbba bbbaabacac bbbaabbaa bbbaabc bbbab bbbabaca bbbabb bbbabc bbbabcaaa bbbac bbbacaab bbbacaabab bbbb bbbba bbbbaa bbbbb bbbbba bbbbbcabbc bbbbc bbbbcaabb bbbbcabccc bbbbcbbaba bbbbcbcaba bbbbcc bbbbcccaba bbbbcccb bbbc bbbca bbbcaa bbbcabaaa bbbcacaa bbbcacbcac bbbcbacbba bbbccbbac bbbccc bbbcccbccb bbc bbca bbcaa bbcaaaaac bbcaaaabab bbcaab bbcaabc bbcaabcb bbcaacaacb bbcaacbba bbcab bbcaba bbcabab bbcababb bbcabba bbcabcab bbcabccca bbcac bbcacaab bbcb bbcbaab bbcbacb bbcbacbacb bbcbb bbcbbb bbcbbcba bbcbcacbca bbcbcbc bbcbccbab bbcc bbccaab bbccabbab bbccacbc bbccbaaaa bbccbca bbccbcba bbcccb bbcccbaca bbcccbc bbccccabcc bc bca bcaaaaaaca bcaaaabba bcaaacacc bcaabaaa bcaabac bcaac bcaacab bcaacb bcaacc bcab bcabaac bcabab bcababacba bcababcac bcabacc bcabb bcabbaaab bcabbacc bcabbbacb bcabbbc bcabbcbabb bcabcbacbc bcaca bcacaabc bcacacbb bcacacca bcacb bcacbb bcacbbabaa bcacbbcaa bcacc bcaccaa bcaccca bcb bcba bcbaa bcbaaaaabc bcbaac bcbab bcbacaa bcbacb bcbaccaac bcbaccbaa bcbb bcbbaaaaca bcbbaacab bcbbaca bcbbb bcbbbab bcbbbbb bcbbbcaab bcbbcab bcbbcb bcbbcba bcbc bcbcaab bcbcabacbc bcbcb bcbcbcaba bcbccabca bcbccacba bcc bcca bccaa bccab bccababbcb bccabacbba bccabb bccabbbc bccabc bccac bccacabaac bccacbbcb bccacccbaa bccb bccbaac bccbabcaa bccbacaaca bccbacbcca bccbbaab bccbbbb bccbc bccbcaca bccbcbabb bccc bcccabb bcccacb bcccbb bcccbbaaa bcccbbc bcccbcccaa bcccc bccccaccc bccccbbcb bcccccabbc bcccccacca bcccccb bcccccc c ca caa caaa caaaabcaa caaaabcb caaaacc caaab caaabac caaacabc caaacca caaacccc caab caaba caabaaab caabacabbc caabba caabbbbba caabbc caabcbcbc caabcccaaa caac caaca caacab caacbbaacc caacbbbca caacca caaccca caacccc cab cabaabcbc cabaacb cabaacbb cabababcaa cababcacaa cabacababb cabacacab cabacc cabb cabba cabbaaabba cabbaabaa cabbab cabbabc cabbabcb cabbacac cabbb cabbbbb cabbbbbbb cabbbbbc cabbbbcbca cabbbcaa cabbc cabbcbbac cabbcbc cabbcc cabc cabcaa cabcaaa cabcaaccbb cabcabbbc cabcabc cabcbaacc cabcbacbc cabcbbca cabcbbcaa cabccbaa cabcccbcc cabcccccb cac caca cacaababca cacaabacbc cacab cacabaaca cacabaca cacabacc cacabc cacac cacaca cacacac cacacbaab cacacbba cacaccaccb cacb cacba cacbaaabab cacbaabbcc cacbaabcca cacbabaac cacbabcba cacbbbcb cacbbccac cacbcbccac cacc caccaa caccaabab caccacac caccba caccbab caccca cacccacb cacccb cacccbcba cb cba cbaa cbaaa cbaaaa cbaaaaab cbaaaaaba cbaaacaaac cbaabac cbaabacbb cbaacabcaa cbaacca cbab cbaba cbabaa cbabab cbabba cbabbabcba cbabbcbac cbabbcbbb cbabc cbabcaba cbabcabbb cbabcaccca cbabccbcc cbac cbaca cbacac cbacacaac cbacacbb cbacb cbacbbbab cbacbc cbaccaa cbaccb cbaccba cbb cbba cbbaa cbbaaaa cbbaabbcb cbbaacaa cbbaacacb cbbaacc cbbab cbbaba cbbabbcb cbbabcba cbbacaccab cbbacbccc cbbacccbb cbbb cbbba cbbbaa cbbbaaabbb cbbbaabc cbbbab cbbbabcc cbbbaca cbbbb cbbbba cbbbbbacbb cbbbc cbbbcbacaa cbbbcbbba cbbbcbccbc cbbbccc cbbc cbbca cbbcaabaa cbbcabb cbbcacc cbbcbab cbbcbacbc cbbcbbaaca cbbcbc cbbccabca cbbccbc cbbcccaaca cbbcccb cbbccccbbc cbc cbca cbcaaa cbcaaaa cbcaaaabc cbcaaabbcb cbcaabbb cbcaacb cbcabaabab cbcababaab cbcabb cbcabc cbcabcabaa cbcabcbbc cbcacc cbcacccac cbcbaabca cbcbb cbcbba cbcbbba cbcbbc cbcbbcabc cbcbcacbac cbcbcb cbcbcbbcb cbcbcbccac cbcbccb cbcbccbab cbcbcccbbb cbccaaab cbccaacc cbccabbac cbccacbcc cbccb cbccba cbccbaaca cbccbacb cbccbba cbccca cbcccc cbccccac cc cca ccaaa ccaaaabb ccaaaabc ccaaababac ccaaabc ccaaabccc ccaababaca ccaabac ccaabcacb ccaabcbc ccaabccaab ccaabcccaa ccaac ccaacabca ccaacb ccaacbbc ccaacc ccaaccbcb ccaacccc ccab ccababbb ccababc ccabb ccabba ccabbab ccabbac ccabbba ccabbbcb ccabbcbcbb ccabc ccabcbabcc ccabcbcca ccabcccb ccac ccacaab ccacaacbc ccacabcb ccacaca ccacbaaa ccacbaabba ccacbaca ccacbbacc ccacbcb ccacc ccaccab ccaccabb ccaccacbaa ccaccbcbab ccb ccba ccbaa ccbaabcbaa ccbaaca ccbab ccbabbc ccbabbccc ccbabccaab ccbac ccbacaac ccbacbc ccbacbcac ccbb ccbba ccbbab ccbbacca ccbbbbaabb ccbbbbccba ccbbbcabcc ccbbbcba ccbbc ccbbcaab ccbbcacac ccbbcbcccc ccbbccaaa ccbbccb ccbbccbbbc ccbcab ccbcabcc ccbcbbbbba ccbcbcaca ccbcc ccbccab ccbccc ccc ccca cccaaaaba cccaacab cccab cccaba cccac cccaca cccacaab cccb cccba cccbaaa cccbaac cccbabc cccbacbc cccbbaac cccbbbbbbb cccbbbbcac cccbcaba cccbcacaac cccbcbbbaa cccbcbbbbc cccbcbcb cccbcbcbc cccbcbcc cccc ccccaabc ccccbccbc ccccc ccccca cccccaabb cccccbccb cccccccb