ParentFull threadpauloxnet·I wrote this solution the first time as an answer to a question on Stack Overflow.https://stackoverflow.com/a/50134728/755343View on HN