Random walks of a particle on lattices with traps