arr = input()
arr2 = list(map(int, arr.split()))
max_arr, min_arr = max(arr2), min(arr2)
arr = arr.replace(str(max_arr), str(min_arr))
print(arr)