Return if cell contain non prime number or obstacle , or going out of matrix or already visited the cell or already found the lexicographical largest path
if ( mappedMatrix [ i ] [ j ] == 0 or i > n or j > m or mark [ i ] [ j ] or q != 0 ) : NEW_LINE INDENT return q ; NEW_LINE DEDENT