s=io.read()t={s:byte(1,-1)}table.sort(t)print(s.char(unpack(t)))
this
hist
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!