N, M = gets.split.map(&:to_i)
G = Hash.new { |h, k| h[k] = Hash.new(false) }
A = Hash.new { |h, k| h[k] = Hash.new(false) }
ANS = Hash.new { |h, k| h[k] = Hash.new(false) }

M.times do
  a, b = gets.split.map(&:to_i)

  G[a][b] = true
  G[b][a] = true
end

if M.odd?
  puts -1
  exit
end

def dfs(v, visited = Hash.new(false))
  visited[v] = true

  G[v].each_key do |u|
    next if visited[u]

    A[v][u] = true
    dfs(u, visited)
  end
end

dfs(1)

def dfs2(v, parent = -1, visited = Hash.new(false), fixed = Hash.new(false))
  A[v].each_key do |u|
    dfs2(u, v, visited, fixed)
  end

  cnt = 0

  G[v].each_key do |u|
    if ANS[v][u]
      cnt += 1
    end
    next if fixed[u]

    cnt += 1
    ANS[v][u] = true
  end

  if cnt.odd? && parent != -1
    ANS[parent][v] = true
    ANS[v][parent] = false
  end

  fixed[v] = true
end

dfs2(1)

1.upto(N) do |v|
  ANS[v].each do |u, connected|
    next if !connected

    puts "#{v} #{u}"
  end
end
