Path vector to store the current path
path = [ ] NEW_LINE path . append ( src ) NEW_LINE q . append ( path . copy ( ) ) NEW_LINE while q : NEW_LINE INDENT path = q . popleft ( ) NEW_LINE last = path [ len ( path ) - 1 ] NEW_LINE DEDENT