#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
inline void outarr(Tp _begin, Tp _end, const char* _delim = " ") {
  for (Tp current = _begin; current != _end; ++current) {
    std::cout << *current << _delim;
  }
  std::cout << '\n';
}
using ll = long long;
using pii = std::pair<int, int>;
constexpr int INF = 0x3f3f3f3f;
constexpr int MOD = static_cast<const int>(1e9 + 7);
constexpr int MAXN = 1000000;
class SegmentTree {
 public:
  struct Node {
    int Min = INF;
    int Push = 0;
  };
  explicit SegmentTree(int n) : tree(n << 2), size(n) { Build(0, 0, size - 1); }
  void Update(int l, int r, int x) { UpdateImpl(0, 0, size - 1, l, r, x); }
  void Set(int i, int x) { SetImpl(0, 0, size - 1, i, x); }
  int Find(int x) { return FindImpl(0, 0, size - 1, x); }

 private:
  int Left(int v) const { return (v << 1) + 1; }
  int Right(int v) const { return (v << 1) + 2; }
  void UpdateVertex(int v) {
    tree[v].Min = min(tree[Left(v)].Min, tree[Right(v)].Min);
  }
  void Push(int v) {
    if (tree[v].Push != 0) {
      for (int j : {Left(v), Right(v)}) {
        tree[j].Min += tree[v].Push;
        tree[j].Push += tree[v].Push;
      }
      tree[v].Push = 0;
    }
  }
  void Build(int v, int tl, int tr) {
    if (tl == tr) {
      tree[v].Min = tl;
      return;
    }
    const int mid = (tl + tr) >> 1;
    Build(Left(v), tl, mid);
    Build(Right(v), mid + 1, tr);
    UpdateVertex(v);
  }
  void UpdateImpl(int v, int tl, int tr, int l, int r, int x) {
    if (l > r) {
      return;
    }
    if (tl == l && r == tr) {
      tree[v].Push += x;
      tree[v].Min += x;
      return;
    }
    Push(v);
    const int mid = (tl + tr) >> 1;
    UpdateImpl(Left(v), tl, mid, l, min(mid, r), x);
    UpdateImpl(Right(v), mid + 1, tr, max(l, mid + 1), r, x);
    UpdateVertex(v);
  }
  void SetImpl(int v, int tl, int tr, int i, int x) {
    if (tl == tr) {
      tree[v].Min = x;
      return;
    }
    Push(v);
    const int mid = (tl + tr) >> 1;
    if (i <= mid) {
      SetImpl(Left(v), tl, mid, i, x);
    } else {
      SetImpl(Right(v), mid + 1, tr, i, x);
    }
    UpdateVertex(v);
  }
  int MinOf(int v) const {
    return v < static_cast<int>((tree).size()) ? tree[v].Min : INF;
  }
  int FindImpl(int v, int tl, int tr, int x) {
    if (tl == tr) {
      return tl;
    }
    Push(v);
    const int mid = (tl + tr) >> 1;
    if (x < MinOf(Right(v))) {
      return FindImpl(Left(v), tl, mid, x);
    }
    return FindImpl(Right(v), mid + 1, tr, x);
  }
  vector<Node> tree;
  const int size;
};
class FenwickTree {
 public:
  explicit FenwickTree(int n) : tree(n, 0) {}
  void Set(int i, int x) {
    for (; i < static_cast<int>((tree).size()); i |= i + 1) {
      tree[i] += x;
    }
  }
  int Sum(int i) {
    int res = 0;
    for (; i >= 0; i = (i & (i + 1)) - 1) {
      res += tree[i];
    }
    return res;
  }
  int Sum(int l, int r) { return Sum(r) - Sum(l - 1); }

 private:
  vector<int> tree;
};
int used[MAXN];
int ans[MAXN];
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  int cnt = 0;
  SegmentTree st(n);
  FenwickTree ft(m);
  for (int i = 0; i < (m); ++i) {
    int x, y;
    cin >> x >> y;
    --x;
    --y;
    if (used[x]) {
      if (y >= cnt || y != ft.Sum(used[x], m - 1)) {
        return cout << (-1) << '\n', 0;
        ;
      }
      ft.Set(used[x] - 1, -1);
      ft.Set(i, 1);
      used[x] = i + 1;
      continue;
    }
    if (y < cnt) {
      return cout << (-1) << '\n', 0;
      ;
    }
    ++cnt;
    used[x] = i + 1;
    const int pos = st.Find(y);
    ans[pos] = x + 1;
    st.Update(0, pos - 1, 1);
    st.Set(pos, INF);
    ft.Set(i, 1);
  }
  if (cnt != n - count(ans, ans + n, 0)) {
    return cout << (-1) << '\n', 0;
    ;
  }
  int cur = 0;
  for (int i = 0; i < (n); ++i) {
    if (!ans[i]) {
      while (used[cur]) {
        ++cur;
      }
      ans[i] = ++cur;
    }
  }
  outarr(ans, ans + n);
  return 0;
}
