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