#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e2 + 50;
const int minm = -0x7;
const long long mod = 998244353;
char s1[] = "5049";
char s2[] = "4950";
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int num = n / 18 + 1;
  for (int i = 0; i < num; i++) {
    for (int j = 0; j < 4; j++) putchar(s1[j]);
  }
  printf("5\n");
  for (int i = 0; i < num; i++) {
    for (int j = 0; j < 4; j++) putchar(s2[j]);
  }
  printf("5\n");
}
