#include <bits/stdc++.h>
using namespace std;
using ld = long double;
using ul = unsigned long long;
using db = double;
using pi = pair<int, int>;
using pl = pair<long long, long long>;
using pd = pair<db, db>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<long long>;
using vd = vector<ld>;
using vs = vector<string>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
template <typename T, size_t size>
using va = vector<array<T, size>>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename A, typename B>
istream &operator>>(istream &in, pair<A, B> &p) {
  return in >> p.first >> p.second;
}
template <typename T>
istream &operator>>(istream &in, vector<T> &vec) {
  for (auto &x : vec) {
    in >> x;
  }
  return in;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (const auto &x : v) os << x << ' ';
  return os;
}
template <typename T, size_t size>
ostream &operator<<(ostream &os, const array<T, size> &arr) {
  for (const auto &x : arr) os << x << ' ';
  return os;
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
  return os << p.first << " " << p.second;
}
template <class T>
bool ckmin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
void debug() { cerr << "\n"; }
template <typename Head, typename... Tail>
void debug(Head H, Tail... T) {
  cerr << ' ' << H;
  debug(T...);
}
const long long mod = 1e9 + 7;
const long long INF = 2e18 + 6;
inline long long modPow(long long x, long long y, long long mod) {
  long long res = 1;
  x = x % mod;
  ;
  while (y > 0) {
    if (y & 1) {
      res = (res * x) % mod;
    }
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
char dirs[4] = {'R', 'D', 'L', 'U'};
unordered_map<char, int> rdirs = {{'R', 0}, {'D', 1}, {'L', 2}, {'U', 3}};
const int MXN = 2e3 + 4;
void solve() {
  int n, m;
  cin >> n >> m;
  vi first(n);
  cin >> first;
  vi b(m);
  cin >> b;
  map<int, int> make_pair, mp2;
  for (int i = 0; i < int(n); i++) {
    make_pair[first[i]]++;
    mp2[first[i]] = i + 1;
  }
  for (int i = 0; i < int(m); i++) {
    if (make_pair[b[i]] == 0) {
      cout << "Impossible"
           << "\n";
      return;
    }
  }
  for (int i = 0; i < int(m); i++) {
    if (make_pair[b[i]] > 1) {
      cout << "Ambiguity"
           << "\n";
      return;
    }
  }
  cout << "Possible"
       << "\n";
  for (int i = 0; i < int(m); i++) {
    cout << mp2[b[i]] << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(6);
  int t = 1, tc = 1;
  while (t--) {
    solve();
    tc++;
  }
  return 0;
}
