#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i;
  while (cin >> n >> m) {
    for (i = 1; i <= n; i++) cout << "1";
    cout << endl;
    for (i = 1; i <= n - 1; i++) cout << "8";
    cout << "9";
    cout << endl;
  }
  return 0;
}
