#include <bits/stdc++.h>
using namespace std;

vector <int> adj[300000+50];
int par[300000+50];
map <pair <int,int> , bool > vis;

int main()
{
    // cout << "Hello World!" << endl;
    ios::sync_with_stdio(false);
    int n,m,x,y;
    cin>>n>>m;
    for(int i=1;i<=m;i++){
        cin>>x>>y;
        adj[x].push_back(y);
        adj[y].push_back(x);
    }
    
    if(1){
        vector <int> src,dest;
        for(int i=1;i<=n;i++){
            par[i]=adj[i].size();
            par[i]%=2;
        }
        for(int i=1;i<=n;i++){
            if(par[i]==0){
                x=i;
                for(auto next : adj[i]){
                    y=next;
                    if(vis[{y,x}]==true){
                        
                    }
                    else{
                        vis[{x,y}]=true;
                        src.push_back(x);
                        dest.push_back(y);
                        par[y]=1-par[y];
                    }
                }
            
            }
        }
        if(src[i].size()<m){
            cout<<=1;
        }
        else
        for(int i=0;i<src.size();i++){
            cout<<src[i]<<" "<<dest[i]<<"\n";
        }
    }
    return 0;
}
