#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <typename T>
void _R(T& x) {
  cin >> x;
}
template <typename T>
void _R(vector<T>& x) {
  for (auto it = x.begin(); it != x.end(); it++) {
    _R(*it);
  }
}
void R() {}
template <typename T, typename... K>
void R(T& head, K&... tail) {
  _R(head);
  R(tail...);
}
template <typename T>
void _W(const T& x, const char c) {
  cout << x;
}
template <typename T>
void _W(const vector<T>& x, const char c) {
  for (auto it = x.cbegin(); it != x.cend(); it++) {
    if (it != x.cbegin()) putchar(c);
    _W(*it, c);
  }
}
void W() {}
template <typename T, typename... K>
void W(const T& head, const K&... tail) {
  _W(head, ' ');
  cout << (sizeof...(tail) ? ' ' : '\n') << flush;
  W(tail...);
}
const double PI =
    3.14159265358979323846264338327950288419716939937510582097494459230;
template <typename T>
inline T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
inline void amin(T& x, T y) {
  if (x > y) x = y;
}
template <typename T>
inline void amax(T& x, T y) {
  if (x < y) x = y;
}
template <typename A, typename B>
class comp {
 public:
  bool operator()(const pair<A, B>& a, const pair<A, B>& b) {
    if (a.first != b.first)
      return a.first < b.first;
    else
      return a.first > b.first;
  }
};
long long fast_exp(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1LL) {
      res *= a;
      res %= 1000000007;
    }
    b >>= 1LL;
    a *= a;
    a %= 1000000007;
  }
  return res;
}
void preprocess(void) { return; }
signed main(int argc, char* argv[], char* envp[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  cerr << fixed;
  cout << fixed;
  preprocess();
  int teeee;
  teeee = 1;
  for (int zeeee = (1); zeeee <= (teeee); zeeee++) {
    int n, m;
    cin >> n >> m;
    vector<int> ans1(2230);
    vector<int> ans2(2230);
    int x1 = 0;
    int p1 = 0;
    while (x1 < n) {
      ans2[p1] = 0;
      ans1[p1++] = 9;
      x1 += 9;
    }
    int x2 = 0;
    while (x2 < n + 1) {
      ans2[p1] = 9;
      ans1[p1++] = 0;
      x2 += 9;
    }
    p1--;
    ans1[p1] = 1;
    ans2[p1] = 8;
    p1++;
    for (int i = p1 - 1; i >= 0; i--) {
      cout << ans1[i];
    }
    cout << endl;
    ans2[0] = 1;
    for (int i = p1 - 1; i >= 0; i--) {
      cout << ans2[i];
    }
    cout << endl;
  }
  cerr << (((double)clock()) / ((double)CLOCKS_PER_SEC)) << endl;
  return 0;
}
