Nonogram representation and solver