Three Stacks. - Michael L. Fredman; Deborah L. Goldsmith (J. Algorithms, 1994)