l = [*map(int, input().split())] print(*[min(l) if i == max(l) else i for i in l])