Text this: Cascaded gain-switching in the mid-infrared region