Use Deque, ArrayDeque, and IntegerStack as appropriate