def load_turing(argv, stdin):
    """Load and return turing machine."""
    if len(argv) > 3:
        with open(argv[3]) as input_file:
            return build_machine(input_file.readlines())
    else:
        return build_machine(stdin.readlines())