#include #include #include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n,m; cin>>n>>m; vector> g(n); vector cnt(n,0); for(int i = 0;i>u>>v; u--;v--; g[u].push_back(v); g[v].push_back(u); cnt[u]++; cnt[v]++; } vector que; for(int i = 0;i