#include <bits/stdc++.h>
using namespace std;
struct bign {
  static const int width = 8, limit = 100000000, maxlen = 500;
  int bit[maxlen], len;
  int operator[](int p) const { return bit[p]; }
  void clearbit() {
    memset(bit, 0, sizeof(bit));
    len = 1;
  }
  void delete0() {
    while (!bit[len - 1] && len > 1) --len;
  }
  bign(int p = 0) { *this = p; }
  bign(const char *p) { *this = p; }
  bign operator=(int p) {
    clearbit();
    len = p ? 0 : 1;
    for (; p; p /= limit) bit[len++] = p % limit;
    return *this;
  }
  bign operator=(const char *p) {
    clearbit();
    len = 0;
    int n = strlen(p);
    for (int i = n - 1; i >= 0; i -= width, ++len)
      for (int j = max(0, i - width + 1); j <= i; ++j)
        bit[len] = bit[len] * 10 + p[j] - '0';
    return *this;
  }
  bool operator<(const bign &a) const {
    if (len != a.len) return len < a.len;
    for (int i = len - 1; i >= 0; --i)
      if (bit[i] != a[i]) return bit[i] < a[i];
    return false;
  }
  bool operator==(const bign &a) const { return !(*this < a) && !(a < *this); }
  bool operator<=(const bign &a) const { return (*this < a) || (*this == a); }
  bool operator>(const bign &a) const { return !(*this <= a); }
  bool operator>=(const bign &a) const { return !(*this < a); }
  bool operator!=(const bign &a) { return !(*this == a); }
  bign operator+=(const bign &a) {
    len = max(len, a.len) + 1;
    for (int i = 0; i < len; ++i) {
      bit[i] += a[i], bit[i + 1] += bit[i] / limit, bit[i] %= limit;
    }
    delete0();
    return *this;
  }
  bign operator-=(const bign &a) {
    for (int i = 0; i < len; ++i)
      if ((bit[i] -= a[i]) < 0) --bit[i + 1], bit[i] += limit;
    delete0();
    return *this;
  }
  bign operator*=(const bign &a) {
    static bign b;
    b = *this;
    clearbit();
    len = a.len + b.len;
    long long res;
    for (int i = 0; i < a.len; ++i)
      for (int j = 0, t; j < b.len; ++j) {
        res = 1LL * a[i] * b[j] + bit[t = i + j];
        bit[t] = res % limit, bit[t + 1] += res / limit;
      }
    delete0();
    return *this;
  }
  bign operator*=(const int &a) {
    len += 3;
    long long res = 0;
    int t = 0;
    for (int i = 0; i < len; ++i)
      res = 1LL * bit[i] * a + t, t = res / limit, bit[i] = res % limit;
    delete0();
    return *this;
  }
  bign operator/=(const int &a) {
    long long res = 0;
    for (int i = len - 1; i >= 0; --i)
      res += bit[i], bit[i] = res / a, res = res % a * limit;
    delete0();
    return *this;
  }
  int operator%=(const int &a) {
    long long res = 0;
    for (int i = len - 1; i >= 0; --i) res = (res * limit + bit[i]) % a;
    return res % a;
  }
  void read() {
    static char s[maxlen * width];
    scanf("%s", s);
    *this = s;
  }
  void print() const {
    printf("%d", bit[len - 1]);
    for (int i = len - 2; i >= 0; --i) printf("%0*d", width, bit[i]);
  }
};
bign operator+(bign a, bign b) { return a += b; }
bign operator-(bign a, bign b) { return a -= b; }
bign operator*(bign a, bign b) { return a *= b; }
bign operator*(bign a, int b) { return a *= b; }
bign operator/(bign a, int b) { return a /= b; }
int operator%(bign a, int b) { return a %= b; }
istream &operator>>(istream &in, bign &x) {
  x.read();
  return in;
}
ostream &operator<<(ostream &out, bign x) {
  x.print();
  return out;
}
bign a, b;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  a = 0;
  b = 1;
  for (int i = 1; i <= n; ++i) a = (a * 10) + 1, b = b * 10;
  cout << a << endl << (b - a) << endl;
}
