Problem B - Latin Noun Declensions
----------------------------------

In Latin, nouns have different endings depending on the function the
noun has in a sentence.  Each noun has 12 forms:  the singular and
plural forms of 6 "cases" (called nominative, genitive, dative,
accusative, ablative and vocative). 

In Latin dictionaries, a noun is described by giving its singular
nominative and genitive forms.  Morphological rules tell us how to 
create all the other forms from this information.  Here are some of 
the morphological rules for Latin nouns.  (There are many more for the
full language.)

Rule 1.  If the two forms in the dictionary are Xa and Xae (where X is
any string), then the 12 cases are:
         Sing     Plural
Nom      Xa       Xae
Gen      Xae      Xarum
Dat      Xae      Xis
Acc      Xam      Xas
Abl      Xa       Xis
Voc      Xa       Xae

(For example, the accusative singular of the noun "ancilla ancillae" is
"ancillam".)

Rule 2.  If the two forms in the dictionary are Xus and Xi (where X is
any string), then the 12 cases are: 
         Sing     Plural
Nom      Xus      Xi
Gen      Xi       Xorum
Dat      Xo       Xis
Acc      Xum      Xos
Abl      Xo       Xis
Voc      Xe       Xi

(For example, the accusative plural of the noun "mundus mundi" is
"mundos".)

Rule 2a.  If the two forms in the dictionary are Yer and Xi (where Y
is any string and either X=Yr or X=Yer), then the 12 cases are: 
         Sing     Plural
Nom      Yer      Xi
Gen      Xi       Xorum
Dat      Xo       Xis
Acc      Xum      Xos
Abl      Xo       Xis
Voc      Yer      Xi

(For example, the vocative plural of the noun "puer pueri" is "pueri".
The ablative singular of the noun "ager agri" is "agro".)

Rule 2b.  If the two forms in the dictionary are Xum and Xi (where X
is any string), then the 12 cases are: 
         Sing     Plural
Nom      Xum      Xa
Gen      Xi       Xorum
Dat      Xo       Xis
Acc      Xum      Xa
Abl      Xo       Xis
Voc      Xum      Xa

Suppose you are writing a programme to translate Latin to English.
When your programme sees a Latin noun, your programme must figure out
which case it is in, whether it is singular or plural, and it must
also figure out what entry to look up in a Latin-English dictionary.

Input Format
------------

The input will contain multiple instances.  The first line will
contain an integer n, which is the number of instances.
Each of the following n lines will contain a single word in lower-case
letters.

Output Format
-------------

For each input word, your programme should first output the word on
a line by itself.  There may be multiple interpretations of that word
that are possible according to the rules given above.  For each
possibility, you should produce one line of output that contains
-the case (Nom, Gen, Dat, Acc, Abl or Voc),
-the number (Singular or Plural), and
-the dictionary entry to look up (i.e. the singular nominative and
singular genitive forms of the noun) 
These four items should be separated by single spaces.
If there are several possible interpretations, list them in any order.
If there are no possible interpretations, your programme should output
"No such noun" on a separate line.

Sample Input
------------

4
amice
amicu
populo
agrorum

Sample Output
-------------

amice
Voc Singular amicus amici
amicu
No such noun
populo
Dat Singular populus populi
Abl Singular populus populi
Dat Singular populum populi
Abl Singular populum populi
agrorum
Gen Plural agrus agri
Acc Singular agrorus agrori
Gen Plural ager agri
Acc Singular agroer agrori
Nom Singular agrorum agrori
Gen Plural agrum agri
Acc Singular agrorum agrori
Voc Singular agrorum agrori