2/5 testcases correct only

i dont know why is this happening. whats wrong with my code or should i need to consider uppercase letters too. though its not mentioned in sample input.