Extending Multistage Interconnection Networks for Multitasking