#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 100 + 10;
pair<int, int> f[MAXN];
int b[MAXN], arr[MAXN];
int t = 0;
int Fnd(int strt, int end, int a) {
  int p = -1;
  int mid = (strt + end) / 2;
  bool chck;
  if (end - strt <= 1 && f[mid].first != a) {
    p = -1;
    return -1;
  } else if (f[mid].first == a) {
    p = f[mid].second;
    t++;
    if (f[mid - 1].first == a || f[mid + 1].first == a) t++;
  } else if (f[mid].first > a) {
    int u = Fnd(strt, mid, a);
    if (u != -1) p = u;
  } else {
    int u = Fnd(mid + 1, end, a);
    if (u != -1) p = u;
  }
  return p;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> f[i].first;
    f[i].second = i;
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
  }
  sort(f, f + n);
  int x;
  bool chck = true;
  for (int i = 0; i < m; i++) {
    t = 0;
    x = Fnd(0, n, b[i]);
    if (x == -1) {
      cout << "Impossible\n";
      return 0;
    } else {
      if (t > 1) chck = false;
      arr[i] = x + 1;
    }
  }
  if (!chck)
    cout << "Ambiguity\n";
  else {
    cout << "Possible\n";
    for (int i = 0; i < m; i++) cout << arr[i] << " ";
  }
}
