If the given vertex is not visited then include it in the set
if ( ! visit [ x [ i ] . second . first ] [ x [ i ] . second . second ] ) { cout << x [ i ] . second . first << " ▁ " << x [ i ] . second . second << endl ; dfs ( x [ i ] . second . first , x [ i ] . second . second , visit , adj , N , M ) ; } } }