#include <bits/stdc++.h>
using namespace std;
struct sort_pred {
  bool operator()(const long long &left, const long long &right) {
    return left < right;
  }
};
long long exp(long long a, long long b) {
  long long ans = 1;
  while (b != 0) {
    if (b % 2) ans = ans * a;
    a = a * a;
    b /= 2;
  }
  return ans;
}
long long f[100005];
long long b[100005];
vector<long long> v[100005];
queue<long long> q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    long long a;
    cin >> a;
    v[a].push_back(i);
  }
  int flag = 0;
  for (long long i = 1; i <= m; i++) {
    long long x;
    cin >> x;
    if (v[x].size() == 0) {
      flag = 2;
      break;
    } else if (v[x].size() > 1) {
      flag = 1;
    } else {
      q.push(v[x][0]);
    }
  }
  if (flag == 1) {
    cout << "Ambiguity" << endl;
  } else if (flag == 2) {
    cout << "Impossible" << endl;
  } else {
    cout << "Possible" << endl;
    while (!q.empty()) {
      cout << q.front() << " ";
      q.pop();
    }
  }
  return 0;
}
