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

#define N 100100

int n, m, deg[N], vis[N];
vector <int> adj[N];
typedef pair <int, int> pii;
vector <pii> ans;

void dfs(int u, int pa = 0) {
    vis[u] = 1;
    for (auto v : adj[u]) {
        if (vis[v]) {
            if (v != pa && vis[v] == 1) {
                ans.emplace_back(pii(u, v));
                deg[u] ++;
            }
            continue;
        }
        dfs(v, u);
    }
    if (pa) {
        if (deg[u] & 1) ans.emplace_back(pii(u, pa)), deg[u] ++;
        else ans.emplace_back(pii(pa, u)), deg[pa] ++;
    }
    vis[u] = 2;
}

int main() {
    scanf("%d %d", &n, &m);
    while (m --) {
        int u, v;
        scanf("%d %d", &u, &v);
        adj[u].push_back(v), adj[v].push_back(u);
    }
    for (int i = 1; i <= n; i ++) if (!vis[i]) {
        dfs(i); if (deg[i] & 1) return puts("-1"), 0;
    }
    for (auto p : ans) printf("%d %d\n", p.first, p.second);

    return 0;
}
