#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int const lmt = 1e5 + 5;
long long int sum(long long int a) {
  long long int ans = 0;
  while (a) {
    ans += (a % 10);
    a = a / 10;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  string a = "", b = "";
  cin >> n >> m;
  for (int i = 1; i <= n; i += 1) a += '1';
  for (int i = 1; i <= n - 1; i += 1) b += '8';
  b += '9';
  cout << a << "\n" << b << "\n";
}
