a = [int(x) for x in input().split()]
b = max(a)
c = min(a)
for x in a:
	if x == b:
		print(c, end=' ')
	else:
		print(x, end=' ')