#include <bits/stdc++.h>
using namespace std;
const int inf = int(1e9) + 7;
const double eps = 0.0000000001, pi = 3.14159265358979323;
const int maxn = int(1e6 + 100);
struct treap {
  int x, y, size;
  treap *l, *r;
  treap() {}
  treap(int x) : x(x), y(rand()), l(NULL), r(NULL), size(1) {}
};
typedef treap* ptreap;
int x[maxn], y[maxn];
ptreap root;
bool u[maxn];
vector<int> vec;
inline int get(const ptreap& v) { return v ? v->size : 0; }
inline void recalc(ptreap& v) {
  if (!v) return;
  v->size = get(v->l) + get(v->r) + 1;
}
void merge(ptreap l, ptreap r, ptreap& t) {
  if (!l || !r) {
    t = !l ? r : l;
    return;
  }
  if (l->y > r->y)
    merge(l->r, r, l->r), t = l;
  else
    merge(l, r->l, r->l), t = r;
  recalc(t);
}
void split(ptreap t, int x0, ptreap& l, ptreap& r) {
  if (!t) {
    l = r = NULL;
    return;
  }
  if (get(t->l) + 1 < x0)
    split(t->r, x0 - get(t->l) - 1, t->r, r), l = t;
  else
    split(t->l, x0, l, t->l), r = t;
  recalc(t);
}
int Find(ptreap v) {
  while (v->l) v = v->l;
  return v->x;
}
int cnt;
void inorder(ptreap v) {
  if (!v) return;
  inorder(v->l);
  if (v->x == -1)
    printf("%d ", vec[cnt++]);
  else
    printf("%d ", v->x);
  inorder(v->r);
}
int main() {
  srand(time(NULL));
  int n, m;
  ptreap tempF, tempS, temp2F, temp2S, tmp1, tmp2;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) merge(root, new treap(-1), root);
  for (int i = 1; i <= m; ++i) scanf("%d%d", &x[i], &y[i]);
  for (int i = m; i >= 1; --i) {
    int First = Find(root);
    if (y[i] == 1) {
      if (First != x[i] && First != -1) {
        cout << -1;
        return 0;
      } else if (First == -1) {
        split(root, 2, tmp1, tmp2);
        merge(new treap(x[i]), tmp2, root);
        u[x[i]] = 1;
      }
      continue;
    }
    if ((First != -1 && First != x[i]) || (First == -1 && u[x[i]])) {
      cout << -1;
      return 0;
    }
    split(root, y[i] + 1, tempF, tempS);
    split(tempF, 2, tmp1, tmp2);
    if (First != -1) {
      merge(tmp2, tmp1, root);
      merge(root, tempS, root);
    } else {
      merge(tmp2, new treap(x[i]), root);
      merge(root, tempS, root);
    }
    u[x[i]] = 1;
  }
  for (int i = 1; i <= n; ++i)
    if (!u[i]) vec.push_back(i);
  inorder(root);
  return 0;
}
