Three stacks one array