# http://c...content-available-to-author-only...e.com/questions/52592/move-to-the-printable-ascii-front/52606#52606 e=d=map(chr,range(32,127)) r="" for c in raw_input():n=e.index(c);r+=d[n];e=[e[n]]+e[:n]+e[n+1:] print r