NONOGRAM LOGIC