#include #include #include #include #include #include using namespace std; vector > G; vector W; //vector >R; set > R; vector P; char D[11000]; void clear_data(){ G.resize(0); W.resize(0); R.clear(); P.resize(0); memset(D,0,2000); } void read_data(int N,int M){ G.resize(N); // R.resize(N,vector(N,false)); R.clear(); W.resize(N,false); P.resize(N,false); for(int i=0;i c(a,b); if(R.find(c)==R.end()){ R.insert(c); }else{ R.erase(c); } } int dfs(int v){ if(W[v])return 0; W[v]=true; int ret=0; for(unsigned int e=0;e >::iterator i=R.begin();i!=R.end();i++){ printf("%d %d\n",i->first+1,i->second+1); } } int main(){ int N,M; scanf("%d %d ",&N,&M); // printf("*%d %d\n",N,M); while(N!=0||M!=0){ clear_data(); read_data(N,M); bool bad=false; for(int i=0;i