#include using namespace std; class UndirectedGraph{ public: size_t n; vector> vertex_to; UndirectedGraph(size_t n):n(n),vertex_to(n){} void connect(int from, int to){ vertex_to[from].emplace_back(to); vertex_to[to].emplace_back(from); } vector& operator[](int v){ return vertex_to[v]; } void resize(size_t _n){ n = _n; vertex_to.resize(_n); } size_t degree(int v){ return vertex_to[v].size(); } }; int m,n; int main(){ int i,j,k; int x,y,a,b; cin >> n>>m; UndirectedGraph graph(n); vector deleted(n,false); for (i=0; i