Company: Goldman Sachs_22july
Difficulty: medium
Five-Digit Number Puzzle Problem Description Anant is trying to solve an online puzzle, in which he has to guess a 5-digit number. Every time he guesses a number, the system responds with a string of length 5, made up of only the letters G, Y, or B, where each letter corresponds to the digit in the guessed number. "G" means the corresponding digit is in the right place in the answer, "Y" means the corresponding digit is present in the answer but is in the wrong place, and "B" means the corresponding digit is missing in the answer. Anant can use this information for his next guess. The five digits in the guesses and the final answer are always unique i.e. same digit cannot appear twice in the number. The numbers cannot start with 0, as that would make it a four digit number. Anant has made only one guess till now and has received the system response. Help him with a program that provides all the possible answers at this stage, so that it becomes easy for him to guess further in the game