Source: https://www.utsc.utoronto.ca/~nick/cscB36/additional-notes/pumping.pdf