n, m = gets.split.map(&:to_i)

mtx = Array.new(n) { Array.new(n) { 0 } }
m.times do
  a, b = gets.split.map(&:to_i)
  mtx[a-1][b-1] = mtx[b-1][a-1] = 1
end

ans = []
n.times do |i|
  row = mtx[i]
  next if row.sum.odd?

  n.times do |j|
    ans << [i, j] if row[j] == 1
    mtx[i][j] = mtx[j][i] = 0
  end
end

n.times do |i|
  row = mtx[i]
  if row.sum.odd?
    puts -1
    exit
  end

  n.times do |j|
    ans << [i, j] if row[j] == 1
    mtx[i][j] = mtx[j][i] = 0
  end
end

ans.each do |c, d|
  puts "#{c+1} #{d+1}"
end