vsp = [int(i) for i in input().split()] mn = min(vsp) mx = max(vsp) for i in range(len(vsp)): if vsp[i] == mx: vsp[i] = mn print(*vsp)