#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int dx4[] = {-1, 0, 1, 0};
const int dy4[] = {0, 1, 0, -1};
const int dx8[] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dy8[] = {-1, 0, 1, -1, 1, -1, 0, 1};
inline long long Int() {
  long long num = 0;
  char c = getchar_unlocked();
  bool sign = true;
  while (!((c >= '0' && c <= '9') || c == '-')) c = getchar_unlocked();
  if (c == '-') {
    sign = false;
    c = getchar_unlocked();
  }
  while (c >= '0' && c <= '9') {
    num = (num << 1) + (num << 3) + c - '0';
    c = getchar_unlocked();
  }
  return sign ? num : -num;
}
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& P) {
  out << '{' << P.first << ", " << P.second << '}';
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  out << '[';
  for (int i = 0; i < (int)v.size(); ++i) {
    out << v[i];
    if (i + 1 < (int)v.size()) out << ", ";
  }
  out << ']';
  return out;
}
template <class S, class T>
ostream& operator<<(ostream& out, const map<S, T>& mp) {
  out << "[\n";
  for (const auto& x : mp) {
    out << '{' << x.first << ", " << x.second << "}\n";
  }
  out << "]\n";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const set<T>& cs) {
  out << '{';
  for (auto it = cs.begin(); it != cs.end();) {
    out << *it;
    it++;
    if (it != cs.end())
      out << ", ";
    else
      out << '}';
  }
  return out;
}
void solve();
int main() {
  cout << fixed << setprecision(15);
  cerr << fixed << setprecision(15);
  solve();
  return 0;
}
const double eps = 1e-10;
const int mod = (int)1e9 + 7;
const int N = (int)2e5 + 5;
int sm(string S) {
  int r = 0;
  for (char c : S) r += (c - 48);
  return r;
}
int sm(long long x) {
  int r = 0;
  while (x) {
    r += (x % 10);
    x /= 10;
  }
  return r;
}
string sub(string a, string b) {
  reverse((a).begin(), (a).end());
  reverse((b).begin(), (b).end());
  while (((int)(b).size()) < ((int)(a).size())) b += '0';
  string res = "";
  int carry = 0;
  for (int i = 0; i < (((int)(a).size())); ++i) {
    int x = a[i] - 48, y = b[i] - 48;
    int add = -1;
    if (x >= y + carry) {
      add = x - (y + carry);
      carry = 0;
    } else {
      add = (x + 10) - (y + carry);
      carry = 1;
    }
    res += (char)(add + 48);
  }
  if (carry) {
    cout << "ERROR" << '\n';
    return "";
  }
  reverse((res).begin(), (res).end());
  return res;
}
void print(string b) {
  int i = 0;
  while (i < ((int)(b).size()) && b[i] == '0') ++i;
  while (i < ((int)(b).size())) putchar(b[i++]);
}
void solve() {
  int n = Int(), m = Int();
  string ab = "";
  for (int i = 0; i < (m); ++i) ab += '1';
  string a = "";
  for (int i = 0; i < (n); ++i) a += '1';
  while (((int)(ab).size()) < ((int)(a).size()) + 1) ab += '0';
  cout << a << '\n';
  string b = sub(ab, a);
  print(b);
  putchar('\n');
}
