Mode competition in nonstationary regimes of high-power gyrotrons