I am afraid there is a piece of hardware which is obstructing your progress. It is black and long and thin and it runs from the back of your computer to the wall. Remove it.
Get a sheet of paper a pencil and an eraser (the latter should be large, because you will use it a lot ). Write down in words of one syllable how you intend to do your exercise. Then you will be able to see how to convert it to code.
Two things to remind yourself of:-
1: You are not dealing with a number, but a String. You can prove you are not dealing with numbers by converting your input to hexadecimal, and it will not work.
2: You can do arithmetic with chars. They are not letters, but numbers hidden behind characters.
subject: Finding the number is having pairs and also number is in sequence/consecutive