Yоu hаve аn ideа fоr a new wоrd-guessing game called "WordMaster". In WordMaster, the program has a saved word of a specific length, and the user tries to guess the word by providing guesses of the same length. Write a class called WordMaster with the following functions: A constructor function that accepts two parameters: answer: a string containing the answer word. max_attempts: an integer representing the maximum number of attempts allowed. A function called guess which accepts one parameter of type string, representing the user's guess. The guess function should do the following: If the user has already reached the maximum number of attempts, print "You have exceeded the maximum number of attempts. Game over!" and return an empty list. If the user guesses the correct word, print "Congratulations! You guessed the word correctly." and return an empty list. If the user's guess is incorrect, return a list containing the following feedback for each character in the guess: If the character is in the correct position, add "Green" to the feedback list. If the character exists in the answer but is in the wrong position, add "Yellow" to the feedback list. If the character does not exist in the answer, add "Gray" to the feedback list. Assumptions you can make: The constructor and guess functions will always be called with a non-empty string for the answer parameter. The max_attempts parameter in the constructor will always be a positive integer. The argument passed to the guess function will always be a string of the same length as the answer. The answer and user-inputted guesses will always be lowercase with only letters and no symbols/whitespace. Example 1:wordmaster = WordMaster("apple", 5)wordmaster.guess("grape") # Returns: ['Gray', 'Gray', 'Yellow', 'Yellow', 'Green']wordmaster.guess("angel") # Returns: ['Green', 'Gray', 'Gray', 'Yellow', 'Yellow']Example 2:wordmaster = WordMaster("banana", 3)wordmaster.guess("cherry") # Returns: ['Gray', 'Gray', 'Gray', 'Gray', 'Gray', 'Gray']wordmaster.guess("orange") # Returns: ['Gray', 'Gray', 'Yellow', 'Yellow', 'Gray', 'Gray']wordmaster.guess("banana") # Prints: Congratulations! You guessed the word correctly. # Returns: []wordmaster.guess("apple") # Prints: You have exceeded the maximum number of attempts. Game over! # Returns: []