Wrong input arguments when i used java and python

programming
Tags: #<Tag:0x00007f242368bbb0>

#1

sample input>>>
2 bb ab

31 aaababaaabbaabbbaaaaabbaaabaababbbbabbaaaaabbb babbbaabbbbbabaaaabbaabbbaabbabbbaababbaabbbba aaaaaaaabbbaababbbbbbbbababbbbbaaabaaababbaaba abaabbaaabbbbbaabaaababababbabbabbbbbbabaababb babbbabaaaababbbabbbabaabbbaababaabaabaabbabbb baabbaaabaabbaabbbbbbbaabbabbaaabaaabbabbbbbaa