#include #include using namespace std; using LL = long long; using P = pair; using Graph = vector>; const int INF = 1 << 29; const long long LINF = 1LL << 60; #define all(x) (x).begin(), (x).end() #define rep(i,n) for(int i = 0; i < (n); ++i) templatevoid chmin(T&a, T b){if(a > b) a = b;} templatevoid chmax(T&a, T b){if(a < b) a = b;} int main(){ int N, M; cin >> N >> M; Graph G(N); for(int i = 0; i < M; ++i){ int s, t; cin >> s >> t; --s; --t; G[s].push_back(t); G[t].push_back(s); } for(auto g : G){ for(auto v : g) cout << v << " "; cout << endl; } cout << endl; int ans = 0; for(int i = 0; i < N; ++i){ for(auto v : G[i]) cout << v << " "; cout << endl; if(G[i].size() == 1){ int tmp = G[i][0]; remove(G[tmp].begin(), G[tmp].end(), i); ans++; } } cout << endl; for(auto g : G){ for(auto v : g) cout << v << " "; cout << endl; } cout << endl; cout << ans << endl; }