In = [int(i) for i in input().split()] m = max(In) for i in range(len(In)): if In[i] == m: In[i] = min(In) print(' '.join([str(i) for i in In]))