#include <bits/stdc++.h>
using namespace std;
int n, m, tmp = 1;
int sum(int a) {
  int res = 0;
  while (a) {
    res += a % 10;
    a /= 10;
  }
  return res;
}
int main() {
  cin >> n >> m;
  if (2 * n > 2220) {
    int nn = n / 2 + n % 2;
    for (int i = 1; i <= nn; ++i) {
      cout << 2;
    }
    cout << endl;
    for (int i = 1; i <= nn - 1; ++i) {
      cout << 7;
    }
    cout << 8 << endl;
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    cout << 1;
  }
  cout << endl;
  for (int i = 1; i <= n - 1; ++i) {
    cout << 8;
  }
  cout << 9 << endl;
}
