#include using namespace std; #define rep(i,n) for (long long i=0;i<(long long)(n);i++) #define all(v) v.begin(),v.end() using ll=long long; using pll=pair; using tll=tuple; const ll inf=-(1ll<<60),INF=(1ll<<60); template void chmin(T &a,T b){ if(a>b){ a=b; } } template void chmax(T &a,T b){ if(a par,siz; union_find(ll n):par(n),siz(n,1){ rep(i,n){ par[i]=i; } } ll root(ll x){ if(par[x]==x) return x; return par[x]=root(par[x]); } void unite(ll x,ll y){ ll rx=root(x); ll ry=root(y); if(rx==ry) return; if(siz[rx]> g; vector d,prev; graph(ll n){ v=n; g.resize(v); d.resize(v,INF); prev.resize(v,-1); } void add_edge(ll s,ll t,ll cost){ g[s].push_back({t,cost}); } void dijkstra(ll s){ rep(i,d.size()){ d[i]=INF; } priority_queue,greater> pq; d[s]=0; pq.push({0,s}); while(!pq.empty()){ ll x_dist,x_vertex; tie(x_dist,x_vertex)=pq.top(); pq.pop(); if(d[x_vertex] vp; ll kruskal(){ priority_queue,greater> pq; rep(i,g.size()){ for(auto edge:g[i]){ pq.push({edge.cost,i,edge.to}); } } ll min_cost=0; union_find uf(g.size()); while(!pq.empty()){ ll x,x_to,x_cost; tie(x_cost,x,x_to)=pq.top(); pq.pop(); if(!uf.same(x,x_to)){ min_cost+=x_cost; uf.unite(x,x_to); vp.emplace_back(x,x_to); } } return min_cost; } }; void dfs(ll x,ll p,vector> &v,vector &ans){ ans.push_back(x); for(auto &i:v[x]){ if(i==p) continue; dfs(i,x,v,ans); } if(ans.back()!=x) ans.push_back(x); } int main(){ ll n,m; cin >> n >> m; vector a(n),b(n); rep(i,n){ cin >> a[i] >> b[i]; } graph g(n); rep(i,n){ for(int j=i+1;j> v(n); rep(i,g.vp.size()){ v[g.vp[i].first].push_back(g.vp[i].second); v[g.vp[i].second].push_back(g.vp[i].first); } vector ans; dfs(0,-1,v,ans); rep(i,m){ cout << 0 << " " << 0 << endl; } cout << ans.size() << endl; rep(i,ans.size()){ cout << 1 << " " << ans[i]+1 << endl; } }