#include using namespace std; bool dfs(const vector>& G, int v, vector& V){ for(int u:G[v]){ if(V[u]==V[v]){ return false; }else{ if(!V[u]){ V[u]=5-V[v]; bool b=dfs(G,u,V); if(!b){ return false; } } } } return true; } int main(){ int n,m; cin >> n >> m; vector> G(n); for(int j=0;j> a >> b; a--; b--; G[a].insert(b); G[b].insert(a); } vector V(n,0); bool b=true; for(int i=0;i