Check if the right move is valid
if ( isSafe ( row , col + 1 , m , n , visited ) ) : NEW_LINE INDENT path += ' R ' NEW_LINE printPathUtil ( row , col + 1 , m , n , path , possiblePaths , visited ) NEW_LINE path = path [ : - 1 ] NEW_LINE DEDENT