for(n in r=readline(a=[]))a[n]=r.slice(n)+"\n" a.sort().map(putstr)