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

vector<int> e[100010];
int c[100010];
int used[100010];
map<pair<int, int>, bool> mm;
void dfs(int curr, int prev) {
    used[curr] = 1;
    for (auto &to: e[curr]) {
        if (used[to]) continue;
        mm[{curr, to}] = 1;
        c[curr]++;
    }
    for (auto &to: e[curr]) {
        if (used[to]) continue;
        dfs(to, curr);
        while (c[to] % 2) {
            mm[{curr, to}] = 0;
            c[to]--;
            mm[{to, curr}] = 1;
            c[curr]++;
        }
    }
    return;
}

int main() {
    int n, m; cin >> n >> m;
    for (int i = 0; i < m; i++) {
        int a, b; cin >> a >> b;
        a--, b--;
        e[a].emplace_back(b); e[b].emplace_back(a);
    }
    dfs(0, -1);
    if (c[0] % 2) cout << -1 << endl;
    else {
        int cnt = 0;
        for (auto &ans: mm) {
            if (ans.second) {
                cnt++;
                cout << ans.first.first+1 << " " << ans.first.second+1 << endl;
            }
        }
        assert(cnt == m);
    }
    return 0;
}