//#include #include using namespace std; //using namespace atcoder; using ll = long long; #define all(A) A.begin(),A.end() using vll = vector; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) using Graph = vector>; Graph G; vll dist; vector seen; ll mod = 1e9 + 7; int main() { ll N; cin>>N; ll k=0; for(ll i=1;i