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.