#include <bits/stdc++.h>
using namespace std;
using namespace rel_ops;
const double pi = acos(-1.0);
const double eps = 1e-11;
const int inf = 0x7FFFFFFF;
template <class T>
inline bool checkmin(T &a, T b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
inline bool checkmax(T &a, T b) {
  return b > a ? a = b, 1 : 0;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
const int N = 1e6 + 1000;
struct Node {
  Node *l, *r, *fa;
  int w, s, rev;
  int v, sav;
  void init(int t = 0) {
    l = r = fa = NULL;
    w = rand() * rand();
    v = t;
    s = 1;
    sav = 0;
  }
  void up() { s = (l ? l->s : 0) + (r ? r->s : 0) + 1; }
  void dn() {
    if (sav) {
      v += sav;
      if (l) {
        l->sav += sav;
      }
      if (r) {
        r->sav += sav;
      }
      sav = 0;
    }
    if (rev) {
      swap(l, r);
      if (l) l->rev ^= 1;
      if (r) r->rev ^= 1;
      rev = 0;
    }
  }
} p[N];
void split(Node *p, Node *&a, Node *&b, int sz) {
  p->dn();
  if (sz <= 0)
    a = NULL, b = p;
  else if (sz >= (p ? p->s : 0))
    a = p, b = NULL;
  else if (sz <= (p->l ? p->l->s : 0)) {
    split(p->l, a, p->l, sz), b = p;
    a->fa = NULL;
    if (p->l) p->l->fa = p;
  } else {
    split(p->r, p->r, b, sz - (p->l ? p->l->s : 0) - 1), a = p;
    b->fa = NULL;
    if (p->r) p->r->fa = p;
  }
  p->up();
}
Node *merge(Node *a, Node *b) {
  if (!a || !b) return a ? a : b;
  a->dn();
  b->dn();
  if (a->w > b->w) {
    a->r = merge(a->r, b), a->r->fa = a;
    a->up();
    return a;
  } else {
    b->l = merge(a, b->l), b->l->fa = b;
    b->up();
    return b;
  }
}
int getpos(Node *a) {
  int ret = (a->l ? a->l->s : 0);
  if (a->rev) ret = (a ? a->s : 0) - 1 - ret;
  for (Node *b = a->fa; b; a = b, b = b->fa) {
    if (a == b->r) ret += (b->l ? b->l->s : 0) + 1;
    if (b->rev) ret = (b ? b->s : 0) - 1 - ret;
  }
  return ret;
}
void trace(Node *a) {
  if (!a) return;
  a->dn();
  trace(a->l);
  printf("%d\n", a->v);
  trace(a->r);
}
Node *vis[N];
int main() {
  int n, m;
  srand(1);
  while (~scanf("%d%d", &n, &m)) {
    Node *root = NULL, *l, *r, *cur;
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < int(n); i++) {
      p[i].init(0);
      root = merge(root, p + i);
    }
    for (int i = 0; i < int(m); i++) {
      int x, pp;
      scanf("%d%d", &x, &pp);
      split(root, l, r, pp - 1);
      split(r, cur, r, 1);
      root = merge(l, r);
      if (vis[x] && vis[x] != cur) {
        puts("-1");
        return 0;
      }
      if (cur->v && cur->v != x) {
        puts("-1");
        return 0;
      }
      cur->v = x;
      vis[x] = cur;
      root = merge(cur, root);
    }
    int tot = 0;
    for (int i = 0; i < n; i++) {
      if (!p[i].v) {
        while (vis[++tot])
          ;
        p[i].v = tot;
      }
    }
    for (int i = 0; i < int(n); i++) printf("%d ", p[i].v);
    puts("");
  }
  return 0;
}
