Three stacks from one array