Error-correcting Codes on a Bethe-like Lattice