#include <bits/stdc++.h>
using namespace std;
const int N = 1000006;
int n, q, nw = 1, A[N], M[N];
struct Node {
  int id = 0, p = 0, sz = 0;
  Node *l = NULL, *r = NULL;
};
int Size(Node *T) { return (T ? T->sz : 0); }
void Split(Node *T, Node *&L, Node *&R, int i) {
  if (!T)
    L = R = NULL;
  else if (Size(T->l) + 1 <= i)
    Split(T->r, T->r, R, i - Size(T->l) - 1), L = T;
  else
    Split(T->l, L, T->l, i), R = T;
  if (T) T->sz = Size(T->l) + Size(T->r) + 1;
}
void Merge(Node *&T, Node *L, Node *R) {
  if (!L)
    T = R;
  else if (!R)
    T = L;
  else if (L->p > R->p)
    Merge(L->r, L->r, R), T = L;
  else
    Merge(R->l, L, R->l), T = R;
  if (T) T->sz = Size(T->l) + Size(T->r) + 1;
}
int main() {
  srand(time(0));
  Node *T = NULL;
  scanf("%d%d", &n, &q);
  for (int i = 0; i < n; i++) {
    Node *X = new Node;
    X->id = i + 1;
    X->p = rand();
    X->sz = 1;
    Merge(T, T, X);
  }
  for (; q; q--) {
    int a, b;
    scanf("%d%d", &a, &b);
    Node *X, *Y;
    Split(T, X, T, b);
    Split(X, X, Y, b - 1);
    if (A[Y->id] && A[Y->id] != a) return !printf("-1");
    if (!A[Y->id] && M[a]) return !printf("-1");
    A[Y->id] = a;
    M[a] = Y->id;
    Merge(X, Y, X);
    Merge(T, X, T);
  }
  for (int i = 1; i <= n; i++) {
    if (!A[i]) {
      while (M[nw]) nw++;
      A[i] = nw++;
    }
    printf("%d ", A[i]);
  }
  return (0);
}
