#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}

int main() {
    int n,m;
    cin >> n >> m;

    vector<int> v[n+1];

    rep(i,m){
        int a,b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }



    if(m%2==1){
        cout << "-1" << endl;
        return 0;
    }

    int flag[n+1] = {};
    vector<int> keep[n+1];
    int count[n+1] = {};
    set<P> s;

    queue<int> que;
    que.push(1);
    flag[1] = 1;

    int mm[m*2][2];
    int mc = 0;

    while(que.size()!=0){
        int x = que.front();
        que.pop();
        //cout << "x = " << x;
        rep(i,v[x].size()){
            int y = v[x][i];
            if(flag[y]==0){
                que.push(y);
                flag[y] = 1;
                s.insert(P(x,y));
                s.insert(P(y,x));
                mm[mc][0] = x;
                mm[mc][1] = y;
                mc++;
                mm[mc][0] = y;
                mm[mc][1] = x;
                mc++;
            }else{
                if(s.find(P(x,y))!=s.end()){
                    continue;
                }else{
                    keep[x].push_back(y);
                    s.insert(P(x,y));
                    s.insert(P(y,x));
                }
            }
        }
    }

    //cout << endl;

    vector<int> v2[n+1];
    rep(i,mc){
        v2[mm[i][0]].push_back(mm[i][1]);
    }

    //cout << "mc = " << mc << endl;

    int flag2[n+1] = {};

    queue<int> q2;
    int qs[n+1] = {};
    rep(i,n+1){
        qs[i] = v2[i].size();
        //cout << qs[i];
        if(v2[i].size()==1){
            q2.push(i);
        }
    }
    //cout << endl;


    while(q2.size()>0){
        int x = q2.front();
        q2.pop();
        //cout << "x2 = " << x << "  qs[x] = " << qs[x] << endl;

        while(keep[x].size()-count[x]>=2){
            cout << x << ' ' << keep[x][count[x]] << endl;
            count[x]++;
            cout << x << ' ' << keep[x][count[x]] << endl;
            count[x]++;
        }
        
        if(qs[x]==0){
            continue;
        }
        if(qs[x]>=2){
            q2.push(x);
            continue;
        }
        flag2[x] = 1;
        while(keep[x].size()-count[x]>=2){
            cout << x << ' ' << keep[x][count[x]] << endl;
            count[x]++;
            cout << x << ' ' << keep[x][count[x]] << endl;
            count[x]++;
        }
        if(keep[x].size()-count[x]==0){
            rep(i,v2[x].size()){
                if(flag2[v2[x][i]]==0){
                    keep[v2[x][i]].push_back(x);
                    qs[v2[x][i]]--;
                    q2.push(v2[x][i]);
                }
            }
        }else{
            cout << x << ' ' << keep[x][count[x]] << endl;
            count[x]++;
            rep(i,v2[x].size()){
                if(flag2[v2[x][i]]==0){
                    cout << x << ' ' << v2[x][i] << endl;
                    qs[v2[x][i]]--;
                    q2.push(v2[x][i]);
                }
            }
        }
        qs[x] = 0;
    }

    return 0;
}
 
 


Measured memory_bytes: 28800