I can't imagine how the special cases are.
Or, someone please check for my I/O.
Input:
Code: Select all
AAABCAAAAAA
CABAABACdeABAf
Code: Select all
AAAAA AAAAAA
ABA CABAABAC
Moderator: Board moderators
Code: Select all
AAABCAAAAAA
CABAABACdeABAf
Code: Select all
AAAAA AAAAAA
ABA CABAABAC
Code: Select all
As the first man said to the
first woman:
"Madam, I'm Adam."
She responded:
"Eve."
AAABCAAAAAA
CABAABACdeABAf
AABBBCCDDDD
Code: Select all
TOT
MADAM MADAMIMADAM
DED ERE
EVE
AAAAA AAAAAA
ABA CABAABAC
BBB DDD DDDD