Use a single array to implement 3 stacks