Added a loop to get up to 10 characters from input.