three stacks on an array