s=/ / print System.in.text[-1..0].collect{s=it+s}.sort().join()