#include <bits/stdc++.h>
using namespace std;
struct Treap {
  int y, key, sz;
  Treap *l, *r;
  Treap(int x) : y(rand()), key(x), l(NULL), r(NULL), sz(1) {}
};
void recalc(Treap *t) {
  if (t == NULL) return;
  t->sz = (t->l == NULL ? 0 : t->l->sz) + 1 + (t->r == NULL ? 0 : t->r->sz);
}
int getsize(Treap *t) {
  if (t == NULL) return 0;
  return t->sz;
}
Treap *merge(Treap *l, Treap *r) {
  if (l == NULL) return r;
  if (r == NULL) return l;
  if (l->y >= r->y) {
    l->r = merge(l->r, r);
    recalc(l);
    return l;
  } else {
    r->l = merge(l, r->l);
    recalc(r);
    return r;
  }
}
pair<Treap *, Treap *> split(Treap *t, int x, int invis) {
  if (t == NULL) return {NULL, NULL};
  int key = invis;
  key += getsize(t->l);
  if (key >= x) {
    auto tmp = split(t->l, x, invis);
    t->l = tmp.second;
    recalc(t);
    return {tmp.first, t};
  } else {
    auto tmp = split(t->r, x, key + 1);
    t->r = tmp.first;
    recalc(t);
    return {t, tmp.second};
  }
}
Treap *root;
void insert() {
  Treap *t = new Treap(0);
  root = merge(root, t);
}
int f(int x, int y) {
  if (y == 1) {
    auto tmp = split(root, y, 0);
    int res = 1;
    if (tmp.first->key == 0)
      res = 0;
    else if (tmp.first->key != x)
      return -1;
    tmp.first->key = x;
    root = merge(tmp.first, tmp.second);
    return res;
  }
  auto tmp = split(root, y, 0);
  auto tmp1 = split(tmp.first, 1, 0);
  int key = tmp1.first->key, res = 1;
  if (key == 0)
    res = 0;
  else {
    if (key != x) return -1;
  }
  tmp1.first->key = x;
  root = merge(merge(tmp1.second, tmp1.first), tmp.second);
  return res;
}
vector<int> tree;
vector<bool> used(1e6 + 1, false);
void look(Treap *t) {
  if (t == NULL) return;
  look(t->l);
  tree.push_back(t->key);
  look(t->r);
}
int main() {
  srand(time(NULL));
  int n, m;
  scanf("%d %d", &n, &m);
  if (n == 1) {
    cout << 1;
    return 0;
  }
  for (int i = 1; i <= n; i++) insert();
  vector<pair<int, int> > p(m);
  for (int i = 0; i < m; i++) scanf("%d %d", &p[i].first, &p[i].second);
  for (int i = m - 1; i >= 0; i--) {
    int res = f(p[i].first, p[i].second);
    if (res == -1) {
      printf("-1");
      return 0;
    }
    if (res == 0 && used[p[i].first]) {
      printf("-1");
      return 0;
    }
    used[p[i].first] = true;
  }
  int cur = 1;
  look(root);
  for (int i = 0; i < (int)tree.size(); i++) {
    if (tree[i] == 0) {
      while (used[cur]) cur++;
      tree[i] = cur;
      used[cur] = true;
      cur++;
    }
    printf("%d ", tree[i]);
  }
}
