def load_markov(argv, stdin):
    """Load and return markov algorithm."""
    if len(argv) > 3:
        with open(argv[3]) as input_file:
            return Algorithm(input_file.readlines())
    else:
        return Algorithm(stdin.readlines())