#include <bits/stdc++.h>
using namespace std;
int a[150000];
int b[150000];
int ans[150000];
int pos[150000];
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    int tmp = 0;
    map<int, int> s;
    s.clear();
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), pos[a[i]] = i, s[a[i]]++;
    for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
    for (int i = 1; i <= m; i++)
      if (s[b[i]] > 1) tmp = 1;
    int flag = 0;
    for (int i = 1; i <= m; i++) {
      if (s[b[i]] == 0) flag = 1;
    }
    if (flag == 1) {
      printf("Impossible\n");
    } else {
      if (tmp == 1) {
        printf("Ambiguity\n");
      } else {
        printf("Possible\n");
        for (int i = 1; i <= m; i++) printf("%d ", pos[b[i]]);
        printf("\n");
      }
    }
  }
}
