I think my code works, though it isn't pretty but the test just crashes after it shows passing several rounds.
From: https://py.checkio.org/mission/disposable-teleports/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116 Safari/537.36
Created at: 2016/09/18 01:56; Updated at: 2016/09/18 17:18