#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, x = 0, y = 0, r = 0, l = 0, m;
  string s = "", s1 = "", s3 = "";
  cin >> n >> m;
  while (x < n) {
    x += 9;
    s += (9 + '0');
    s += '0';
  }
  s += '9';
  s1 += '9';
  int dd = s.size();
  int sum = 0;
  for (int i = 0; i < dd; i++) {
    if (i == dd - 1)
      s1 += '1';
    else if (s[i] == '0')
      s1 += '9';
    else
      s1 += '0';
  }
  cout << s << "\n";
  cout << s1 << "\n";
  return 0;
}
