https://www.rodrigobrito.net/qtrepenc.html