Phase-dependent gain and absorption properties of mid- to far-infrared lights in three-coupled-quantum-wells