Compute transitions on tails

Instead of just watching the previous characters, watch the N previous characters
Take the tail length in parameter of rand_word.py