Array implementation of three stacks