#include <bits/stdc++.h>
using namespace std;
inline long long next(void) {
  long long k;
  cin >> k;
  return k;
}
int w[55];
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n = next(), m = next();
  while (m--) w[next()] = next();
  for (int i = 1; i <= n; i++) cout << w[i];
  return 0;
}
