During World War I, Lawrence's Arab Legion was operating on the southern flank of the Ottoman Empire. Hampered by artillery fire from across a river, Lawrence asked for a volunteer to cross the river at night and locate the enemy guns. An Egyptian soldier stepped forward. The man was assigned to Lawrence's headquarters [G.H.Q. for 'general headquarters'--this becomes important later] and had a reputation for bringing bad luck. But Lawrence decided to send him. The mission was successful and the soldier appeared, at dawn the next morning, at a remote sentry post near the river, dripping wet, shivering, and clad in nothing but his underwear and native regimental headgear. The sentry wired to Lawrence for instructions, and he replied:
Warm plucky G.H.Q. jinx, fez to B.V.D.'s (Stephen Jay Gould, Bully for Brontosaurus. W. W. Norton, 1992)
A great bargain:A nut for a jar of tuna.A permissive friend:Al lets Della call Ed “Stella.”An Italian palindrome:Amore, Roma.A long example:Are we not pure? “No, sir!” Panama’s moody Noriega brags. “It is garbage!” Irony dooms a man—a prisoner up to new era.
A moral dilemma:Borrow or rob?Follow the words, not the letters:King, are you glad you are king?A weird concept:Taco catBad eyesight:Was it a car or a cat I saw?A list of naughty people:Dennis, Nell, Edna, Leon, Nedra, Anita, Rolf, Nora, Alice, Carol, Leo, Jane, Reed, Dena, Dale, Basil, Rae, Penny, Lana, Dave, Denny, Lena, Ida, Bernadette, Ben, Ray, Lila, Nina, Jo, Ira, Mara, Sara, Mario, Jan, Ina, Lily, Arne, Bette, Dan, Reba, Diane, Lynn, Ed, Eva, Dana, Lynne, Pearl, Isabel, Ada, Ned, Dee, Rena, Joel, Lora, Cecil, Aaron, Flora, Tina, Arden, Noel, and Ellen sinned.A news report:Ed, I saw Harpo Marx ram Oprah W. aside.A record, set straight:Madam, in Eden, I’m Adam.A hitman for hire:Murder for a jar of red rum.Call your mother:Mom.A gross creature:Oozy rat in a sanitary zoo.Verbal abuse:Yo, banana boy!Would you try:UFO tofu?
3. Generating Anagram
Elon Musk had a baby boy on May 4, 2020:
He named his boy XaeA-12 despite a follower listed the whole line of anagram options on Twitter : Nole, Lone, Enlo, Elno, Len, Lon, Nel, One, No, Le, On etc.
Write a program to generate anagram of a word automatically so users can save time in the future.