#include <bits/stdc++.h>
using namespace std;
struct Treap {
  int key;
  int prior;
  int pos;
  int size;
  int val;
  Treap* l;
  Treap* r;
  Treap(int val) {
    this->val = -1;
    l = nullptr;
    r = nullptr;
    this->prior = rand();
    size = 1;
    this->pos = val;
  }
};
void update_size(Treap*& t) {
  if (t == nullptr) return;
  t->size = (t->l != nullptr ? t->l->size : 0) +
            (t->r != nullptr ? t->r->size : 0) + 1;
  int adasd = t->size;
}
Treap* merge(Treap* tl, Treap* tr) {
  if (tl == nullptr) return tr;
  if (tr == nullptr) return tl;
  if (tl->prior > tr->prior) {
    tl->r = merge(tl->r, tr);
    update_size(tl);
    return tl;
  } else {
    tr->l = merge(tl, tr->l);
    update_size(tr);
    return tr;
  }
}
void split(Treap* t, int key, Treap*& tl, Treap*& tr) {
  if (t == nullptr) {
    tl = nullptr;
    tr = nullptr;
    return;
  }
  int l = t->l != nullptr ? t->l->size : 0;
  if (key > l) {
    split(t->r, key - l - 1, tl, tr);
    t->r = tl;
    update_size(t);
    tl = t;
  } else {
    split(t->l, key, tl, tr);
    t->l = tr;
    update_size(t);
    tr = t;
  }
}
int tests() {
  Treap* tree = new Treap(0);
  int pr = tree->prior;
  for (int i = 1; i < 5; i++) {
    Treap* to_merge = new Treap(i);
    int asd = to_merge->prior;
    tree = merge(tree, to_merge);
  }
  int ddd = tree->size;
  Treap* tl;
  Treap* tr;
  split(tree, 2, tl, tr);
  Treap* tl2;
  Treap* tr2;
  split(tr, 1, tl2, tr2);
  int ksdf = tl->val;
  exit(0);
}
vector<pair<int, int> > ans;
void dfs(Treap* t) {
  if (t == nullptr) return;
  ans.push_back({t->pos, t->val});
  dfs(t->l);
  dfs(t->r);
}
void error() {
  printf("-1");
  exit(0);
}
vector<unsigned char> used;
int main() {
  cin.sync_with_stdio(false);
  Treap* tree = new Treap(1);
  int n, m;
  scanf("%d%d", &n, &m);
  used.resize(n + 10);
  for (int i = 2; i <= n; i++) {
    Treap* v = new Treap(i);
    tree = merge(tree, v);
  }
  for (int i = 1; i <= m; i++) {
    int val, pos;
    scanf("%d%d", &val, &pos);
    if (val > n || pos > n) error();
    Treap* tl1;
    Treap* tr1;
    split(tree, pos - 1, tl1, tr1);
    Treap* tl2;
    Treap* tr2;
    split(tr1, 1, tl2, tr2);
    if (tl2->val != -1 && tl2->val != val) error();
    if (tl2->val == -1 && used[val] == 1) error();
    tl2->val = val;
    used[val] = 1;
    tree = merge(tl2, tl1);
    tree = merge(tree, tr2);
  }
  dfs(tree);
  sort(ans.begin(), ans.end());
  deque<int> not_used;
  for (int i = 1; i <= n; i++) {
    if ((int)used[i] == 0) not_used.push_back(i);
  }
  for (auto& i : ans) {
    if (i.second == -1) {
      printf("%d ", (int)not_used[0]);
      not_used.pop_front();
    } else
      printf("%d ", i.second);
  }
  return 0;
}
