Creating a Markov chain from a txt input.