added solution for nonograms