#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  int a[n];
  memset(a, 0, sizeof a);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int s, c;
    cin >> s >> c;
    int a[n];
    a[s - 1] = c;
  }
  for (int i = 0; i < n; i++) cout << a[i];
}
