Learning Generic and Dynamic Locomotion of Humanoids Across Discrete Terrains