#include<bits/stdc++.h>

using namespace std;

const int   N   = 1e5 + 1;

vector<int> g[N];
vector<int> v(N);

int f[N];
int tot = 0;

int dfs(int u,int p)    {
    v[u] = ++tot;
    for(int x : g[u])   if (x != p) {
        if(!v[x])   dfs(x,u);
        if (v[x] < v[u])    {
            cout << u << " " << x << "\n";
            f[u] ^= 1;
        }
    }
    if (f[u])   cout << u << " " << p << "\n", f[u] ^= 1;
    else if (p) cout << p << " " << u << "\n", f[p] ^= 1;
}

int main()  {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    int n, m;   cin >> n >> m;

    if (m & 1)  return  0 * puts("-1");

    while (m--) {
        int x;  cin >> x;
        int y;  cin >> y;
        g[x].push_back(y);
        g[y].push_back(x);
    }
    dfs(1,0);
}
