#include <iostream>
using namespace std;
const int n = 8;
int G[][ n ] = { {0,0,0,1,0,0,0,0},
{0,0,1,0,1,0,1,0},
{1,0,0,0,0,0,1,0},
{0,1,0,0,0,0,0,0},
{0,0,0,1,0,0,0,0},
{0,1,0,0,1,0,1,1},
{0,0,0,0,0,0,0,0},
{0,0,0,1,0,1,0,0} };
int color[ n ], d[ n ], f[ n ], p[ n ], time;
void DFS_visit( int u ) {
// Your code here
}
void SCC() {
// Your code here
}
// You may add other functions
void main() {
SCC();
}