#include <bits/stdc++.h>
using namespace std;
inline void smin(int &a, int b) {
  if (b < a) a = b;
}
inline void smax(int &a, int b) {
  if (b > a) a = b;
}
struct Node {
  Node *pre, *ch[2];
  int id, sz;
  void up() { sz = ch[0]->sz + ch[1]->sz + 1; }
  void down() {}
};
struct Splaytree {
  int top;
  Node node[1000010], *null, *root;
  void Rotate(Node *first, int c) {
    Node *second = first->pre;
    second->ch[!c] = first->ch[c];
    if (first->ch[c] != null) first->ch[c]->pre = second;
    first->pre = second->pre;
    if (second->pre != null)
      second->pre->ch[second->pre->ch[1] == second] = first;
    first->ch[c] = second;
    second->pre = first;
    second->up();
  }
  void Splay(Node *first, Node *go) {
    while (first->pre != go) {
      if (first->pre->pre == go)
        Rotate(first, first->pre->ch[0] == first);
      else {
        Node *second = first->pre, *z = second->pre;
        int f = z->ch[1] == second;
        if (second->ch[f] == first)
          Rotate(second, !f);
        else
          Rotate(first, f);
        Rotate(first, !f);
      }
    }
    first->up();
    if (go == null) root = first;
  }
  void RTO(int k, Node *go) {
    Node *first = root;
    while (first->ch[0]->sz != k) {
      if (first->ch[0]->sz > k)
        first = first->ch[0];
      else {
        k -= first->ch[0]->sz + 1;
        first = first->ch[1];
      }
    }
    Splay(first, go);
  }
  Node *newnode(int c, Node *f) {
    Node *first = &node[++top];
    first->pre = f;
    first->ch[0] = first->ch[1] = null;
    first->sz = 1;
    first->id = c + 1;
    return first;
  }
  Node *build(int l, int r, Node *f) {
    if (l > r) return null;
    int mid = (l + r) / 2;
    Node *first = newnode(mid, f);
    first->ch[0] = build(l, mid - 1, first);
    first->ch[1] = build(mid + 1, r, first);
    first->up();
    return first;
  }
  void init(int N) {
    null = &node[0];
    null->sz = 0;
    null->pre = NULL;
    top = 0;
    root = newnode(-1, null);
    root->ch[1] = newnode(-1, root);
    (root->ch[1]->ch[0]) = build(0, N - 1, root->ch[1]);
    root->ch[1]->up();
    root->up();
  }
  void out(Node *first) {
    if (first == null) return;
    first->down();
    out(first->ch[0]);
    printf("(%d %d %d) ", first->id, first->sz, a[first->id]);
    out(first->ch[1]);
  }
  int a[1000010], b[1000010];
  void solve() {
    Node *first;
    int n, m, i, j, k, p, ok;
    scanf("%d %d ", &n, &m);
    for (i = 1; i <= n; i++) a[i] = b[i] = 0;
    init(n);
    ok = 1;
    while (m--) {
      scanf("%d %d ", &k, &p);
      RTO(p - 1, null);
      RTO(p + 1, root);
      i = (root->ch[1]->ch[0])->id;
      if (a[i] && a[i] != k) {
        ok = 0;
        break;
      }
      if (b[k] && a[i] != k) {
        ok = 0;
        break;
      }
      a[i] = k;
      b[k] = 1;
      first = (root->ch[1]->ch[0]);
      (root->ch[1]->ch[0]) = null;
      root->ch[1]->up();
      root->up();
      RTO(0, null);
      RTO(1, root);
      (root->ch[1]->ch[0]) = first;
      first->pre = root->ch[1];
      root->ch[1]->up();
      root->up();
    }
    if (ok) {
      for (i = j = 1; i <= n; i++) {
        if (a[i])
          printf("%d ", a[i]);
        else {
          while (b[j]) j++;
          printf("%d ", j);
          b[j] = 1;
        }
      }
      puts("");
    } else
      puts("-1");
  }
} spt;
int main() {
  spt.solve();
  return 0;
}
