A constructive proof of the existence of Viterbi processes