Typing detection

Cheers all,
I am trying to figure out a way for the game to constantly generate a string of randomized letters where the player would have to type in the exact one that’s first and then go onto the next, next, next and so on as it would get proceduraly generated at random.

Also if it were able to have it somehow detect correct input and also incorrect input seeing how I’d like to have a benefit for correctly typing and penalty for missing letters.