#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -f;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  x *= f;
}
void print(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (!x) return;
  print(x / 10), putchar(x % 10 + 48);
}
void write(int x) {
  if (!x)
    putchar('0');
  else
    print(x);
  putchar('\n');
}
const int maxn = 1e6 + 10;
const int inf = 1e9;
const double eps = 1e-8;
const int mod = 1e9 + 7;
int n, m, head[maxn], tot, cnt, fa[maxn], d[maxn];
struct edge {
  int to, nxt;
} e[maxn << 1];
void ins(int u, int v) { e[++tot] = (edge){v, head[u]}, head[u] = tot; }
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void dfs(int x, int fa) {
  for (int i = head[x]; i; i = e[i].nxt)
    if (e[i].to != fa) dfs(e[i].to, x);
  if (x == 1) return;
  if (d[x] & 1)
    d[x]++, printf("%d %d\n", x, fa);
  else
    d[fa]++, printf("%d %d\n", fa, x);
}
int main() {
  read(n), read(m);
  for (int i = 1; i <= n; i++) fa[i] = i;
  if (m & 1) return puts("-1"), 0;
  for (int i = 1; i <= m; i++) {
    int x, y, u, v;
    read(x), read(y);
    u = find(x), v = find(y);
    if (u == v)
      printf("%d %d\n", x, y), d[x]++;
    else
      ins(x, y), ins(y, x), fa[u] = v;
  }
  dfs(1, 0);
  return 0;
}
