#include <bits/stdc++.h>
using namespace std;
int a[1000001];
int b[1000001];
int proba(string a, string b) {
  int cnt = 0, ind;
  for (int i = 0; i < min(a.size(), b.size()); i++) {
    ind = i + 1;
    if (i + 1 == min(a.size(), b.size())) {
      ind = 0;
    }
    if (a[i] == b[ind]) cnt++;
  }
  if (cnt == max(a.size(), b.size()))
    return 1;
  else
    return -1;
}
int main() {
  int m, x;
  cin >> m >> x;
  for (int i = 1; i <= 9; i++) {
    int q = 0, w = i;
    string ans = "", an = "";
    int k = 0;
    for (int j = 0; j < m; j++) {
      q = q + w * x;
      int y = q % 10;
      a[k] = y;
      b[k++] = w;
      w = y;
      q = q / 10;
    }
    if (q != 0) {
      a[k] = q;
      b[k++] = w;
    }
    if (k == m and b[m - 1] != 0) {
      int ind, cnt = 0;
      for (int ii = 0; ii < k; ii++) {
        ind = ii + 1;
        if (ii + 1 == k) {
          ind = 0;
        }
        if (a[ii] == b[ind]) cnt++;
      }
      if (cnt == m) {
        for (int ii = m - 1; ii >= 0; ii--) {
          cout << b[ii];
        }
        return 0;
      }
    }
  }
  cout << "Impossible";
}
