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