#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int f[MAXN], b[MAXN], fp[MAXN], id[MAXN];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &f[i]), fp[f[i]]++, id[f[i]] = i;
  int sum = 0, tsum = 0;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i]);
    if (fp[b[i]] == 1)
      sum++;
    else if (fp[b[i]] > 1)
      tsum++;
  }
  if (sum + tsum < m)
    puts("Impossible");
  else if (tsum > 0)
    puts("Ambiguity");
  else {
    puts("Possible");
    bool used = 0;
    for (int i = 1; i <= m; i++) {
      if (fp[b[i]] == 1) {
        if (used > 0) printf(" ");
        printf("%d", id[b[i]]);
        used = 1;
      }
    }
    puts("");
  }
  return 0;
}
