If condition doesn 't satisfy
if ( black < 2 * ( max ( N , M ) ) ) : NEW_LINE INDENT print ( " NO " ) NEW_LINE return NEW_LINE DEDENT visited = [ ] NEW_LINE for i in range ( 0 , N ) : NEW_LINE INDENT temp = [ ] NEW_LINE for j in range ( 0 , M ) : NEW_LINE INDENT temp . append ( False ) NEW_LINE DEDENT visited . append ( temp ) NEW_LINE DEDENT