An anagram is a word formed by rearranging all the letters of another word, using each letter exactly once. These words use every letter from "OYAMRS":
The chief magistrate of a city or borough; the chief officer of a municipal corporation. In some American cities there is a city court of which the major is chief judge.