require 'set'
n,m = gets.split.map(&:to_i)
G = Array.new(n+1){[]}
visited = [false]*(n+1)
conn = [false]*(n+1)
cnt = [0]*(n+1)
par = []*(n+1)

ans = Set.new

if m%2==1
  p -1
  exit
end

m.times do
  a,b = gets.split.map(&:to_i).sort
  G[a] << b
  G[b] << a
  cnt[a]+=1
  ans << [a,b]
end

stack = [1]
conn[1] = true
while !stack.empty?
  v = stack[-1]
  if !visited[v]
    G[v].each do |u|
      if !conn[u]
        par[u] = v
        stack << u
        conn[u] = true
      end
    end
    visited[v] = true
  else
    if cnt[v] % 2 == 1
      x,y = [v,par[v]].sort
      ans.delete([x,y])
      ans << [y,x]
      cnt[x]-=1
      cnt[y]+=1
    end
    stack.pop
  end
end

ans.each do |a|
  puts a.join(" ")
end
