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