#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  vector<int> f(n);
  vector<int> b(m);
  for (int i = 0; i < n; ++i) cin >> f[i];
  for (int i = 0; i < m; ++i) cin >> b[i];
  map<int, pair<int, int> > m1;
  for (int i = 0; i < n; ++i) {
    m1[f[i]].first++;
    m1[f[i]].second = i;
  }
  vector<int> res;
  bool amb = 0;
  for (int i = 0; i < m; ++i) {
    if (m1[b[i]].first == 1) res.push_back(m1[b[i]].second);
    if (!m1[b[i]].first) {
      cout << "Impossible";
      return 0;
    }
    if (m1[b[i]].first > 1) {
      amb = 1;
    }
  }
  if (amb) {
    cout << "Ambiguity";
    return 0;
  }
  cout << "Possible" << endl;
  for (int i = 0; i < res.size(); ++i) cout << res[i] + 1 << " ";
}
