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