Python implementation of Chinese Postman algorithm