(lambda l: print(" ".join([str(x) if x != max(l) else str(min(l)) for x in l])))([int(x) for x in input().split()])