Words are called anagrams of if they all share the same set of letters to form the respective words. Example:…