Set stack of each mode.