while 1: _=input();a=_[:];b=sorted(_) for e in b:x,y=map(a.index,(e,b.pop()));a[x]=a[y]=_[x],_[y]=_[y],e print`_`.replace(' ','')