#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a;
  vector<int> b;
  for (int i = 0; i < n; i++) a.push_back(1);
  for (int i = 0; i < n - 1; i++) b.push_back(8);
  b.push_back(9);
  for (int i = 0; i < n; i++) cout << a[i];
  cout << endl;
  for (int i = 0; i < n; i++) cout << b[i];
}
