(define (read-2)
  (cons (read) (read)))

(define (read-commands m)
  (delete-duplicates
   (sort-by
    (if (= m 0)
        '()
        (cons (read-2) (read-commands (- m 1)))) car <)))

(define (solve n m)
  (let next ((idx (iota n 1))
             (cmd (read-commands m)))
    (if (or (null? idx) (null? cmd))
        '()
        (let ((i (car idx))
              (c (car cmd)))
          (cond ((< i (car c))
                 (cons (if (= i 1) 1 0) (next (cdr idx) cmd)))
                ((= i (car c))
                 (if (and (= i 1) (= (cdr c) 0))
                     '(-1)
                     (cons (cdr c) (next (cdr idx) (cdr cmd)))))
                ((> i (car c))
                 '(-1)))))))

(define (main args)
  (let* ((nm (read-2))
         (ret (solve (car nm) (cdr nm))))
    (if (any (lambda (x) (= x -1)) ret)
        (print -1)
        (apply print ret)) 0))
