Permutations Generated by a Stack of Depth 2 and an Infinite Stack in Series

We prove that the set of permutations generated by a stack of depth two and an infinite stack in series has a basis (defining set of forbidden patterns) consisting of 20 permutations of length 5, 6, 7 and 8. We prove this via a "canonical" generating algorithm.