#include #include #include using namespace std; using ll = long long; #include #include #include int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n,m; cin>>n>>m; vector u(m),v(m); atcoder::scc_graph g(n); for(int i = 0;i>u[i]>>v[i]; u[i]--;v[i]--; g.add_edge(u[i],v[i]); } auto use = g.scc(); vector> ans; vector cnt(n,0); for(int i = 0;i