The Riemann theta function solutions for the hierarchy of Bogoyavlensky lattices