pure python nonogram solver