a=str(input()).split() b=[] for i in a: b.append(int(i)) m=min(b) for i in range(len(b)): if b[i] == max(b): b[i]=m print(*b,sep=' ')