Input (grade 7): The widow of a maharajah is known as a Rajmata.
Output (grade 7): A female ruler is known as Maharani (or Maharanee) or great queen.