#include <bits/stdc++.h>
using namespace std;
void divide(string &a, string &ans, long long divisor, long long temp,
            long long index, bool start) {
  if (temp >= divisor) {
    int x = temp / divisor;
    temp %= divisor;
    ans += char('0' + x);
    start = true;
  } else {
    if (start) ans += "0";
  }
  temp *= 10;
  temp += (a[index] - '0');
  ++index;
  if (index > a.size()) {
    return;
  }
  divide(a, ans, divisor, temp, index, start);
}
void solve() {
  int p, x;
  cin >> p >> x;
  int divisor = 10 * x - 1;
  unordered_map<int, int> d;
  d[9] = 1;
  d[19] = 18;
  d[29] = 28;
  d[39] = 6;
  d[49] = 42;
  d[59] = 58;
  d[69] = 22;
  d[79] = 13;
  d[89] = 44;
  int checker = d[divisor];
  if (p % checker) {
    if (x != 5) {
      cout << "Impossible\n";
      return;
    } else {
      if (p % 6) {
        cout << "Impossible\n";
        return;
      } else {
        divisor = 49;
        string a = "6";
        for (int i = 0; i < p - 1; ++i) {
          a += "9";
        }
        a += "3";
        string ans = "";
        divide(a, ans, divisor, 0, 0, false);
        cout << ans << "\n";
        return;
      }
    }
  }
  int move = 1;
  while ((double)(divisor / move) >= 10) {
    ++move;
  }
  map<int, char> ads;
  ads[0] = '0';
  ads[1] = '1';
  ads[2] = '2';
  ads[3] = '3';
  ads[4] = '4';
  ads[5] = '5';
  ads[6] = '6';
  ads[7] = '7';
  ads[8] = '8';
  ads[9] = '9';
  int comp = 10 - move;
  string a = "";
  a += ads[move - 1];
  for (int i = 0; i < p - 1; ++i) {
    a += "9";
  }
  a += ads[comp];
  string ans = "";
  divide(a, ans, divisor, 0, 0, false);
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
}
