Solution verified with multiple strings. working fine but failed when submitted. What's is wrong?