checks all four points connected with input [ i ] [ j ]
for u in range ( 4 ) : NEW_LINE INDENT if ( is_valid ( i + y_move [ u ] , j + x_move [ u ] , x , input ) ) : NEW_LINE INDENT BFS ( x , y , i + y_move [ u ] , j + x_move [ u ] , input ) ; NEW_LINE DEDENT DEDENT