def output_op(program, state, parameters, modes):
    """Output operation."""
    value = program[parameters[0]] if modes[0] == 0 else parameters[0]
    state['output'].append(value)
    return True, 1