#include <bits/stdc++.h>
using namespace std;
const int NMax = 100002;
int nr[NMax];
int poz[NMax];
vector<int> result;
int main() {
  int n, m;
  int i, j;
  int x;
  scanf("%d %d\n", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    nr[x]++;
    poz[x] = i;
  }
  x = 0;
  int tag = 0;
  for (i = 1; i <= m; i++) {
    scanf("%d", &x);
    if (nr[x] == 1) {
      result.push_back(poz[x]);
    } else if (nr[x] == 0) {
      printf("Impossible\n");
      return 0;
    } else if (nr[x] > 1) {
      tag = 2;
    }
  }
  if (tag == 2) {
    printf("Ambiguity");
    return 0;
  }
  printf("Possible\n");
  for (auto it = result.begin(); it != result.end(); it++) {
    printf("%d ", *it);
  }
}
