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

using i64 = int64_t;

#define rep(i, x, y) for (i64 i = i64(x), i##_max_for_repmacro = i64(y); i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define print(x)
#endif

const int inf = 1.01e9;
const i64 inf64 = 4.01e18;
const double eps = 1e-9;

template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << "(" << p.first << ", " << p.second << ")";
    return os;
}

template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
    os << "[";
    for (const auto &v : vec) {
        os << v << ",";
    }
    os << "]";
    return os;
}

template <typename T>
bool chmin(T &a, const T &b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template <typename A, typename T, size_t size>
void fill(A (&ary)[size], const T &val) {
    fill((T *)ary, (T *)(ary + size), val);
}
class lca_solver {
public:
    vector<vector<int>> chldren;  // chldren[i] = 頂点iの子のリスト(ただし親を含んでいる場合でも正常に動く)
    int root;
    // if root,parent is -1.
    vector<int> parent;
    vector<int> depth;
    vector<vector<int>> parent_pow2;
    lca_solver(vector<vector<int>> &children_, int root_)
            : chldren(children_), root(root_) {
        calc_parent_and_depth();
        calc_parent_pow2();
    };
    int lca(int u, int v) {
        // make sure depth(u) > depth(v).
        if (depth[u] < depth[v]) swap(u, v);
        for (size_t k = 0; k < parent_pow2.size(); k++) {
            if (((depth[u] - depth[v]) >> k) & 1) {
                u = parent_pow2[k][u];
            }
        }
        if (u == v) return u;
        for (int k = (int)parent_pow2.size() - 1; k >= 0; k--) {
            if (parent_pow2[k][u] != parent_pow2[k][v]) {
                u = parent_pow2[k][u];
                v = parent_pow2[k][v];
            }
        }
        return parent_pow2[0][u];
    }
    int dist(int u, int v) {
        return depth[u] + depth[v] - depth[lca(u, v)] * 2;
    }

private:
    void calc_parent_and_depth() {
        parent = vector<int>(chldren.size(), -1);
        depth = vector<int>(chldren.size(), -1);
        sub_calc_parent_and_depth(root, -1, 0);
    }
    void sub_calc_parent_and_depth(int cur, int par, int dep) {
        parent[cur] = par;
        depth[cur] = dep;
        for (int child : chldren[cur]) {
            if (child != par) {
                sub_calc_parent_and_depth(child, cur, dep + 1);
            }
        }
    }
    void calc_parent_pow2() {
        // parent_pow2[k][i] = 2^k parent of node i.
        parent_pow2 = vector<vector<int>>(ceil(log(chldren.size()) / log(2) + 1),
                                          vector<int>(chldren.size(), -1));
        parent_pow2[0] = parent;
        for (size_t k = 0; k + 1 < parent_pow2.size(); k++) {
            for (size_t v = 0; v < chldren.size(); v++) {
                if (parent_pow2[k][v] >= 0) {
                    parent_pow2[k + 1][v] = parent_pow2[k][parent_pow2[k][v]];
                }
            }
        }
    }
};

void solve() {
    //constexpr i64 mod = 1'000'000'007;
    i64 N,M;
    cin >> N >> M;
    vector<i64> A(M),B(M);
    rep(i,0,M){
        cin >> A[i] >> B[i];
        --A[i];
        --B[i];
    }

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

    vector<vector<i64>> graph(N);
    rep(i,0,M){
        graph[A[i]].emplace_back(B[i]);
        graph[B[i]].emplace_back(A[i]);
    }

    vector<pair<i64,i64>> ans;

    vector<bool> visited(N);
    vector<bool> closed(N);
    vector<vector<int>> tree(N);
    vector<i64> out(N);
    function<void(i64,i64)> rec=[&](i64 u,i64 p){
        visited[u]=true;
        for(auto v:graph[u]){
            if(v==p) continue;
            if(closed[v]) continue;
            ++out[u];
            if(!visited[v]) {
                print(u);
                print(v);
                tree[u].emplace_back(v);
                rec(v, u);
            }else{
                print(u);
                print(v);
                ans.emplace_back(make_pair(u,v));
            }
        }
        closed[u]=true;
    };

    rec(0,-1);

    lca_solver ls(tree,0);

    vector<i64> us;
    rep(i,0,N) if(out[i]%2==1) us.emplace_back(i);

    if(us.size()%2!=0){
        cout << -1 << endl;
        return;;
    }

    print(us);

    vector<pair<i64,i64>> ps;
    rep(i,0,us.size()/2){
        ps.emplace_back(make_pair(us[i],us[i+us.size()/2]));
    }

    vector<i64> sum(N);

    for(auto p:ps){
        i64 u=p.first,v=p.second;
        i64 w=ls.lca(u,v);

        sum[w]++;
        sum[w]++;
        sum[u]--;
        sum[v]--;
    }

    print(sum);

    function<i64(i64)> dfs=[&](i64 u){
        i64 res=sum[u];
        for(auto v:tree[u]){

            i64 tmp=dfs(v);
            if(tmp%2==0) ans.emplace_back(make_pair(u,v));
            else ans.emplace_back(make_pair(v,u));
            res+=tmp;
        }
        return res;
    };
    dfs(0);

    rep(i,0,ans.size()){
        cout << ans[i].first+1 << " " << ans[i].second+1 << endl;
    }
}

int main() {
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(16);
    solve();
    return 0;
}


Measured memory_bytes: 47728