Genetic Code, Hamming Distance and Stochastic Matrices