#include <bits/stdc++.h>
using namespace std;
template <class T>
void minimize(T &i, const T &j) {
  if (i > j) i = j;
}
template <class T>
void maximize(T &i, const T &j) {
  if (i < j) i = j;
}
int NUM, AM;
char BUFFER[(1 << 16) + 1], *pNum = BUFFER;
int MAIN();
int main() {
  MAIN();
  return 0;
}
struct Treap {
  struct Node {
    int value, priority, size;
    Node *Left, *Right;
    Node() {}
    Node(int value) {
      this->value = value;
      priority = rand() % RAND_MAX;
      size = 1;
      this->Left = this->Right = NULL;
    }
    ~Node() {
      delete Left;
      delete Right;
    }
  };
  typedef Node *node;
  node root;
  Treap() : root(NULL) {}
  ~Treap() { delete root; }
  int size(node r) {
    if (r == NULL) return 0;
    return r->size;
  }
  int size() { return size(root); }
  void update(node r) {
    if (r) r->size = size(r->Left) + size(r->Right) + 1;
  }
  void merge(node &r, node Left, node Right) {
    if (!Left || !Right)
      r = Left ? Left : Right;
    else if (Left->priority > Right->priority)
      merge(Left->Right, Left->Right, Right), r = Left;
    else
      merge(Right->Left, Left, Right->Left), r = Right;
    update(r);
  }
  void split(node r, node &Left, node &Right, int pos, int add = 0) {
    if (!r) return void(Left = Right = NULL);
    int cur_pos = add + size(r->Left);
    if (pos <= cur_pos)
      split(r->Left, Left, r->Left, pos, add), Right = r;
    else
      split(r->Right, r->Right, Right, pos, add + 1 + size(r->Left)), Left = r;
    update(r);
  }
  void insert(int value, int position) {
    node p = new Node(value);
    node Right;
    split(root, root, Right, position);
    merge(root, root, p);
    merge(root, root, Right);
  }
  node find(int position) {
    node p = root;
    int cur_pos = 0;
    while (true) {
      if (cur_pos + size(p->Left) > position)
        p = p->Left;
      else {
        cur_pos += size(p->Left);
        if (cur_pos == position)
          return p;
        else
          cur_pos++, p = p->Right;
      }
    }
  }
  int &operator[](int position) { return find(position)->value; }
  void erase(node &r, int position, int add = 0) {
    int cur_pos = add + size(r->Left);
    if (cur_pos == position)
      merge(r, r->Left, r->Right);
    else if (cur_pos > position)
      erase(r->Left, position, add);
    else
      erase(r->Right, position, add + size(r->Left) + 1);
    update(r);
  }
  void erase(int position) { erase(root, position); }
} a;
const int limit = 1000000 + 5;
int x[limit], y[limit];
bool b[limit];
int MAIN(void) {
  int n, m;
  {
    do {
      if (!*pNum) {
        if (feof(stdin))
          memset(BUFFER, 0, sizeof BUFFER);
        else
          fread(BUFFER, 1, (1 << 16), stdin);
        pNum = BUFFER;
      }
      NUM = *pNum++;
    } while (!(('0' <= (NUM)) && ((NUM) <= '9')) && NUM != '-');
    if (NUM == '-') {
      AM = 1;
      {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      };
    } else
      AM = 0;
    n = NUM - '0';
    {
      if (!*pNum) {
        if (feof(stdin))
          memset(BUFFER, 0, sizeof BUFFER);
        else
          fread(BUFFER, 1, (1 << 16), stdin);
        pNum = BUFFER;
      }
      NUM = *pNum++;
    };
    while ((('0' <= (NUM)) && ((NUM) <= '9'))) {
      n = n * 10 + (NUM - '0');
      {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      };
    }
    if (AM) n = -n;
  };
  {
    do {
      if (!*pNum) {
        if (feof(stdin))
          memset(BUFFER, 0, sizeof BUFFER);
        else
          fread(BUFFER, 1, (1 << 16), stdin);
        pNum = BUFFER;
      }
      NUM = *pNum++;
    } while (!(('0' <= (NUM)) && ((NUM) <= '9')) && NUM != '-');
    if (NUM == '-') {
      AM = 1;
      {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      };
    } else
      AM = 0;
    m = NUM - '0';
    {
      if (!*pNum) {
        if (feof(stdin))
          memset(BUFFER, 0, sizeof BUFFER);
        else
          fread(BUFFER, 1, (1 << 16), stdin);
        pNum = BUFFER;
      }
      NUM = *pNum++;
    };
    while ((('0' <= (NUM)) && ((NUM) <= '9'))) {
      m = m * 10 + (NUM - '0');
      {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      };
    }
    if (AM) m = -m;
  };
  for (int i = 0; i < n; ++i) a.insert(-1, a.size());
  for (int i = 0; i < m; ++i) {
    {
      do {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      } while (!(('0' <= (NUM)) && ((NUM) <= '9')) && NUM != '-');
      if (NUM == '-') {
        AM = 1;
        {
          if (!*pNum) {
            if (feof(stdin))
              memset(BUFFER, 0, sizeof BUFFER);
            else
              fread(BUFFER, 1, (1 << 16), stdin);
            pNum = BUFFER;
          }
          NUM = *pNum++;
        };
      } else
        AM = 0;
      x[i] = NUM - '0';
      {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      };
      while ((('0' <= (NUM)) && ((NUM) <= '9'))) {
        x[i] = x[i] * 10 + (NUM - '0');
        {
          if (!*pNum) {
            if (feof(stdin))
              memset(BUFFER, 0, sizeof BUFFER);
            else
              fread(BUFFER, 1, (1 << 16), stdin);
            pNum = BUFFER;
          }
          NUM = *pNum++;
        };
      }
      if (AM) x[i] = -x[i];
    };
    {
      do {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      } while (!(('0' <= (NUM)) && ((NUM) <= '9')) && NUM != '-');
      if (NUM == '-') {
        AM = 1;
        {
          if (!*pNum) {
            if (feof(stdin))
              memset(BUFFER, 0, sizeof BUFFER);
            else
              fread(BUFFER, 1, (1 << 16), stdin);
            pNum = BUFFER;
          }
          NUM = *pNum++;
        };
      } else
        AM = 0;
      y[i] = NUM - '0';
      {
        if (!*pNum) {
          if (feof(stdin))
            memset(BUFFER, 0, sizeof BUFFER);
          else
            fread(BUFFER, 1, (1 << 16), stdin);
          pNum = BUFFER;
        }
        NUM = *pNum++;
      };
      while ((('0' <= (NUM)) && ((NUM) <= '9'))) {
        y[i] = y[i] * 10 + (NUM - '0');
        {
          if (!*pNum) {
            if (feof(stdin))
              memset(BUFFER, 0, sizeof BUFFER);
            else
              fread(BUFFER, 1, (1 << 16), stdin);
            pNum = BUFFER;
          }
          NUM = *pNum++;
        };
      }
      if (AM) y[i] = -y[i];
    };
  }
  b[0] = true;
  for (int i = m - 1; i >= 0; --i) {
    int cur = a[0];
    if ((cur == -1 && b[x[i]]) || (cur != -1 && cur != x[i]))
      return printf("-1"), 0;
    if (cur == -1) cur = x[i];
    b[cur] = true;
    a.erase(0);
    a.insert(cur, y[i] - 1);
  }
  int k = 0;
  for (int j = 0; j < n; ++j) {
    int i = a[j];
    if (i == -1)
      while (b[k]) i = ++k;
    b[i] = true;
    printf("%d ", i);
  }
  return 0;
}
