#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t = 0, n, x, y, z, i, j, k, g, q, ans = 0, sum = 0, c = 0;
  cin >> n >> x;
  for (i = 1; i <= n; i++) cout << 1;
  printf("\n");
  for (i = 1; i <= n - 1; i++) cout << 8;
  cout << 9;
  printf("\n");
  return 0;
}
