It can be easily solved by arranging the first 2 letters in alphabetical order...the
rest 3 adjust themselves accordingly
here is the list of words according to preference:
AA ( GIN)-----------------6 words
AG ( AIN)-----------------6 words
AI (AGN)----------------6 words
AN (AGI)-----------------6 words
GA (AIN)-----------------6 words
GI (AAN)---------------3 words
GN (AAI)-----------------3 words
IA (GAN)---------------6 words
IG (AAN)---------------3 words
IN (AAG)---------------3 words
NA (AGI)
...
... and so on
now we can see that by the end of IN(AAG) we complete 48 words
so the 50th word will be second word of next row
1st-NAAGI, second- NAAIG
so we hav 50th word NAAIG