ordoneaza crescator: g,dag,cg,kg,mg,q,dg,hg.

Răspuns :

mg, cg, dg, g , dag, hg, kg, q
mg,cg,dg,g,dag,hg,kg,q