#include <bits/stdc++.h>
template <class T>
struct greater {
  bool operator()(const T& x, const T& y) const { return x > y; }
};
using namespace std;
long long int a[100005], n, m, b[100005], x, ind[100005];
vector<int> res;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a[x]++;
    ind[x] = i + 1;
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
  }
  int check = 1;
  for (int i = 0; i < m; i++) {
    if (a[b[i]] == 1 && b[i] != 0) {
      res.push_back(ind[b[i]]);
    }
    if (a[b[i]] > 1) {
      check = 2;
    }
    if (a[b[i]] == 0) {
      check = 0;
      break;
    }
  }
  if (check == 1) {
    cout << "Possible" << endl;
    for (int i = 0; i < res.size(); i++) {
      cout << res[i] << ' ';
    }
    cout << endl;
  }
  if (check == 0) cout << "Impossible" << endl;
  if (check == 2) {
    cout << "Ambiguity" << endl;
  }
}
