#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int f[maxn], pos[maxn];
int main() {
  int n, m, tmp;
  bool ambs, psble;
  vector<int> ans;
  while (cin >> n >> m) {
    ans.clear();
    ambs = psble = false;
    memset(f, 0, sizeof(f));
    for (int i = 0; i < n; i++) {
      scanf("%d", &tmp);
      f[tmp]++;
      pos[tmp] = i + 1;
    }
    for (int i = 0; i < m; i++) {
      scanf("%d", &tmp);
      if (f[tmp] > 1)
        ambs = true;
      else if (f[tmp] == 1)
        ans.push_back(pos[tmp]);
      else
        psble = true;
    }
    if (psble == true)
      puts("Impossible");
    else if (ambs == true)
      puts("Ambiguity");
    else {
      puts("Possible");
      int size = ans.size();
      for (int i = 0; i < size - 1; i++) printf("%d ", ans[i]);
      printf("%d\n", ans[size - 1]);
    }
  }
  return 0;
}
