#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, m, n, a = 0, b = 0;
  cin >> n >> m;
  k = n;
  k = k / 9;
  n = n % 9;
  if (n != 0) k++;
  for (i = 0; i < k; i++) cout << 54;
  cout << endl;
  for (i = 0; i < k - 1; i++) cout << 45;
  cout << 46;
  cout << endl;
  return 0;
}
