#include<bits/stdc++.h>
//ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//clock_t start=clock();clock_t end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int ui;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppll;
typedef pair<ll,pll> plpl;
typedef tuple<ll,ll,ll> tl;
ll mod=1000000007;
ll mod2=998244353;
ll mod3=1000003;
ll mod4=998244853;
ll inf=1LL<<60;
long double pi=3.141592653589793238462643383279L;
double eps=1e-12;
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define rrep(i,n,m) for(ll i=n;i>=m;i--)
#define srep(itr,st) for(auto itr=st.begin();itr!=st.end();itr++)
int dh[4]={1,-1,0,0};
int dw[4]={0,0,1,-1};
int ddh[8]={-1,-1,-1,0,0,1,1,1};
int ddw[8]={-1,0,1,-1,1,-1,0,1};
ll gcd(ll a,ll b){
    if(a<b)swap(a,b);
    if(b==0)return a;
    if(a%b==0)return b;
    return gcd(b,a%b);
}
ll Pow(ll n,ll k){
    ll ret=1;
    ll now=n;
    while(k>0){
        if(k&1)ret*=now;
        now*=now;
        k/=2;
    }
    return ret;
}
ll beki(ll n,ll k,ll md){
  ll ret=1;
  ll now=n;
  while(k>0){
    if(k%2==1){
      ret*=now;
      ret%=md;
    }
    now*=now;
    now%=md;
    k/=2;
  }
  return ret;
}
ll gyaku(ll n,ll md){
  return beki(n,md-2,md);
}
struct edge{
    int from,to,num;
};
int main(){
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int n,m;cin>>n>>m;
    vector<pii> v[n+1];
    int a[m],b[m];
    rep(i,0,m){
        cin>>a[i]>>b[i];
        v[a[i]].push_back({b[i],i});
        v[b[i]].push_back({a[i],i});
    }
    queue<int> q;
    q.push(1);
    int par[n+1];
    par[1]=0;
    v[1].push_back({0,-1});
    bool used[m];
    fill(used,used+m,false);
    bool used2[n+1];
    fill(used2,used2+n+1,false);
    used2[1]=true;
    int cnt[n+1];
    fill(cnt,cnt+n+1,0);
    vector<pii> ans;
    int cnn[n+1];
    rep(i,1,n+1)cnn[i]=v[i].size();
    while(q.size()>0){
        int now=q.front();q.pop();
        rep(i,0,v[now].size()){
            int ne=v[now][i].first,num=v[now][i].second;
            if(used[num])continue;
            if(ne==par[now])continue;
            if(used2[ne]){
                cnt[now]++;
                ans.push_back({now,ne});
                used[num]=true;
                cnn[now]--;
                cnn[ne]--;
                continue;
            }
            used2[ne]=true;
            par[ne]=now;
            q.push(ne);
            used[num]=true;
        }
    }
    //rep(i,1,n+1)cout<<par[i]<<" ";
    int cnt2[n+1];
    fill(cnt2,cnt2+n+1,0);
    rep(i,1,n+1){
        if(cnn[i]==1){
            q.push(i);
        }
    }
    while(q.size()>0){
        int now=q.front();q.pop();
        if(now==1)break;
        int pp=par[now];
        if(cnt[now]%2){
            ans.push_back({now,pp});
            cnt[now]++;
        }
        else{
            ans.push_back({pp,now});
            cnt[pp]++;
        }
        cnt2[pp]++;
        if(cnt2[pp]==cnn[pp]-1)q.push(pp);
    }
    if(cnt[1]%2)cout<<-1<<endl;
    else{
        rep(i,0,ans.size())cout<<ans[i].first<<" "<<ans[i].second<<endl;
    }
}




Measured memory_bytes: 10996