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

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define br() p("")
#define pn(s) cout << (#s) << " " << (s) << endl
#define p_yes() p("YES")
#define p_no() p("NO")

const ll mod = 1e9 + 7;
const ll inf = 1e18;

void vprint(vector<ll> A){
    ll L = A.size();
    FOR(i, 0, L){
        if(i) cout << ' ';
        cout << A[i];
    }
    cout << endl;
}

struct UnionFind{
    vector<ll> parent;
    UnionFind(){
    }

    void initialize(ll sz){
        parent.resize(sz);
        reset();
    }

    void reset(){
        FOR(i, 0, parent.size()){
            parent[i] = i;
        }
    }

    void unite(ll a, ll b){
        if(a>b){
            swap(a, b);
        }
        ll rootA = findRoot(a);
        ll rootB = findRoot(b);
        if(rootA>rootB){
            swap(rootA, rootB);
        }
        if(rootA==rootB){
            return;
        }else{
            // 小さい方を親にする
            parent[rootB] = rootA;
        }
    }

    ll findRoot(ll a){
        if(parent[a]==a){
            return a;
        }else{
            return parent[a] = findRoot(parent[a]);
        }
    }

    map<ll, vector<ll> > getGroups(){
        map<ll, vector<ll> > G;
        FOR(i, 0, parent.size()){
            ll r = findRoot(i);
            G[r].push_back(i);
        }
        return G;
    }

    bool is_same_group(ll a, ll b){
        ll rootA = findRoot(a);
        ll rootB = findRoot(b);
        if(rootA==rootB){
            return true;
        }else{
            return false;
        }
    }
};

const int N_MAX = 100010;

vector<vector<ll> > G;

// 出次数
ll out[N_MAX];

// edge done
bool done[N_MAX];

ll parent[N_MAX];
UnionFind uf;
vector<pair<ll, ll> > Ans;

// 葉まで行って出次数見て、張る
void dfs(ll i, ll prev){
    for(ll to : G[i]){
        if(prev==to) continue;
        parent[to] = i;
        dfs(to, i);
    }

    ll p = parent[i];
    
    if(i==0) return;

    if(out[i]%2==1){
        // iから出す
        // i->p
        out[i]++;
        Ans.push_back(make_pair(i, p));
    }else{
        // p->i
        out[p]++;
        Ans.push_back(make_pair(p, i));
    }
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    // input
    ll N, M;
    cin >> N >> M;

    if(M%2==1){
        p(-1);
        return 0;
    }

    vector<ll> A(M);
    vector<ll> B(M);
    FOR(i, 0, M){
        cin >> A[i] >> B[i];
        A[i]--;
        B[i]--;
    }

    uf.initialize(N);

    G.resize(N);
    // make spanning tree
    FOR(i, 0, M){
        ll a = A[i];
        ll b = B[i];
        if(uf.is_same_group(a, b)){
            // 適当に方向づけ
            // a -> b
            out[a]++;
            Ans.push_back(make_pair(a, b));
        }else{
            // 辺をはる
            G[a].push_back(b);
            G[b].push_back(a);
            uf.unite(a, b);
        }
    }

    dfs(0, -1);

    // pn(Ans.size());

    for(auto pa : Ans){
        p2(pa.first + 1, pa.second + 1);
    }
    
    return 0;
}

Measured memory_bytes: 17776