#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, m, x, y, ans[N], k = 1;
bool used[N];
struct item {
  int key, cnt, prior;
  item *l, *r;
  item(int _key) {
    key = _key, prior = rand() | (rand() << 15), l = nullptr, r = nullptr;
  }
};
typedef item *pitem;
pitem t, l, r;
int cnt(pitem v) { return v ? v->cnt : 0; }
void upd_cnt(pitem &v) {
  if (v) {
    v->cnt = cnt(v->l) + cnt(v->r) + 1;
  }
}
void split(pitem v, int key, pitem &l, pitem &r, int add = 0) {
  if (!v) {
    l = r = NULL;
    return;
  }
  int cur_key = add + cnt(v->l);
  if (cur_key >= key) {
    split(v->l, key, l, v->l, add);
    r = v;
  } else {
    split(v->r, key, v->r, r, add + 1 + cnt(v->l));
    l = v;
  }
  upd_cnt(v);
}
void merge(pitem &v, pitem l, pitem r) {
  if (!l || !r) {
    v = l ? l : r;
  } else if (l->prior >= r->prior) {
    merge(l->r, l->r, r);
    v = l;
  } else {
    merge(r->l, l, r->l);
    v = r;
  }
  upd_cnt(v);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    merge(t, t, new item(i));
  }
  while (m--) {
    cin >> x >> y;
    split(t, y - 1, t, r);
    split(r, 1, l, r);
    if (!ans[l->key] && !used[x]) {
      ans[l->key] = x;
    } else if (ans[l->key] != x) {
      return cout << "-1", 0;
    }
    used[x] = true;
    merge(t, l, t);
    merge(t, t, r);
  }
  for (int i = 1; i <= n; i++) {
    if (!ans[i]) {
      while (used[k]) {
        k++;
      }
      ans[i] = k++;
    }
    cout << ans[i] << " ";
  }
}
