#include <bits/stdc++.h>
const int MAX_N = 250005;
const int MOD = 10000;
const int p10[5] = {1, 10, 100, 1000};
struct BIGN {
  int a[MAX_N + 5];
  int &operator[](int i) { return a[i]; }
  void operator=(int x) {
    memset(a, 0, sizeof a);
    a[1] = x;
  }
  int operator%(int x) {
    int mod = 0;
    for (int i = MAX_N; i >= 1; --i) mod = (mod * MOD + a[i]) % x;
    return mod;
  }
  BIGN operator/=(int x) {
    int mod = 0;
    for (int i = MAX_N; i; --i) {
      int t = a[i];
      a[i] = (a[i] + mod * MOD) / x, mod = (mod * MOD + t) % x;
    }
    return *this;
  }
  BIGN operator-=(int x) {
    a[1] -= x;
    for (int i = 1; i < MAX_N; ++i)
      a[i] += (a[i - 1] + MOD) / MOD - 1, a[i - 1] = (a[i - 1] + MOD) % MOD;
    return *this;
  }
  BIGN operator*=(int x) {
    for (int i = 1; i < MAX_N; ++i)
      a[i] = a[i] * x + a[i - 1] / MOD, a[i - 1] %= MOD;
    return *this;
  }
  void print() {
    int p = MAX_N;
    while (!a[p] && p > 1) p--;
    printf("%d", a[p--]);
    while (p >= 1) printf("%04d", a[p--]);
  }
};
int p, x;
BIGN a;
BIGN b;
int main() {
  scanf("%d%d", &p, &x);
  if (p == 1) {
    if (x == 1)
      printf("1");
    else
      printf("Impossible");
    exit(0);
  }
  a[(p - 1) / 4 + 1] = p10[(p - 1) % 4];
  a -= x;
  for (int i = 1; i <= 9; ++i) {
    if (((a % (10 * x - 1)) * (i % (10 * x - 1))) % (10 * x - 1) == 0) {
      b = a;
      b *= i, b /= (10 * x - 1);
      if (b[(p - 1) / 4 + 1] < p10[(p - 2) % 4]) continue;
      b.print();
      printf("%d\n", i);
      exit(0);
    }
  }
  printf("Impossible");
}
