Suppose that stacks and queues are provided as opaque data types, offering only operations to add elements, to remove elements, and to test for emptiness. Suppose that a programmer wants to count the number of elements in a given stack or queue $C$, which is currently in some state $t$, using only one auxiliary stack or queue $D$. The structures $C$ and $D$ can be used in any way possible based on the methods they offer, but $C$ must be restored to its state $t$ after counting its elements. Counting elements as described above is possible for which of the following data types?
(1) $C$ is a queue and $D$ is a queue.
(2) $C$ is a stack and $D$ is a stack.
(3) $C$ is a queue and $D$ is a stack.
- $1$ and $2$ only.
- $1$ and $3$ only.
- $1$, $2$ and $3$.