def sol():
    dwarfs = [int(input()) for i in range(9)]
    dwarfs.sort()
    all_dwarfs = sum(dwarfs)
    for i in range(8):
        for j in range(i + 1, 9):
            if all_dwarfs - dwarfs[i] - dwarfs[j] == 100:
                print(
                    "\n".join(
                        map(str, [dwarfs[idx] for idx in range(9) if idx not in [i, j]])
                    )
                )
                return


if __name__ == "__main__":
    sol()

def sol():
    dwarfs = [int(input()) for i in range(9)]
    dwarfs.sort()
    all_dwarfs = sum(dwarfs)
    for i in range(8):
        for j in range(i + 1, 9):
            if all_dwarfs - dwarfs[i] - dwarfs[j] == 100:
                print(
                    "\n".join(
                        map(str, [dwarfs[idx] for idx in range(9) if idx not in [i, j]])
                    )
                )
                return


if __name__ == "__main__":
    sol()
