#include <bits/stdc++.h>
using namespace std;
long long modpow(long long base, long long exponent, long long modulus) {
  long long result = 1;
  while (exponent > 0) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent = exponent >> 1;
    base = (base * base) % modulus;
  }
  return result;
}
long long gcd(long long u, long long v) { return (v != 0) ? gcd(v, u % v) : u; }
long long mulmod(long long a, long long b, long long c) {
  long long x = 0, y = a % c;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x + y) % c;
    }
    y = (y * 2) % c;
    b /= 2;
  }
  return x % c;
}
int n, m, f[2 * 100005], b[2 * 100005], a[2 * 100005], idx[2 * 100005],
    freq[2 * 100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int poss = 1;
  memset(idx, -1, sizeof idx);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> f[i];
    freq[f[i]]++;
    idx[f[i]] = i;
  }
  for (int i = 0; i < m; ++i) cin >> b[i];
  for (int i = 0; i < m; ++i) {
    a[i] = idx[b[i]];
    if (a[i] == -1) {
      cout << "Impossible\n";
      return 0;
    }
    if (freq[b[i]] > 1) poss = 2;
  }
  if (poss == 1) {
    cout << "Possible\n";
    for (int i = 0; i < m; ++i) cout << a[i] + 1 << " ";
  } else
    cout << "Ambiguity";
  return 0;
}
