#import using namespace std; long n,h,i,u,v,x[1<<17],k; vectorG[1<<17],p(1<<18,-1e9); main(){ for(cin>>n>>h;i>h; for(;cin>>u>>v;G[u].push_back(v)) if(x[--u]