(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 (dup-idx? cmd)
  (if (<= (length cmd) 1)
      #f
      (if (= (car cmd) (cdar cmd))
          #t
          (dup-idx? (cdr cmd)))))

(define (car-cmd cmd)
  (if (null? cmd)
      (cons 4 0)
      (car cmd)))

(define (solve n m)
  (let ((commands (read-commands m)))
    (if (dup-idx? (map car commands))
        '(-1)
        (let next ((idx (iota n 1))
                   (cmd commands))
          (if (or (null? idx))
              '()
              (let ((i (car idx))
                    (c (car-cmd cmd)))
                (cond ((< i (car c))
                       (cons (if (and (< 1 n) (= 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)))
    (let ((ret (solve (car nm) (cdr nm))))
      (if (or (not (= (car nm) (length ret)))
              (any (lambda (x) (= x -1)) ret))
          (print -1)
          (apply print ret)))) 0)
