Types of characters that can be passed in input string is not mentioned clearly

It’s not mentioned which all letters can be sent in the string e.g. capital letters or special characters.
My code written for only small letters works for all cases except 2nd and 3rd case. Please clear this doubt.

@dmcutypie110 there are only 256 ASCII characters so you can easily include all the possible characters if nothing is mentioned in the question.