func_code_string: #include <bits/stdc++.h>   using namespace std;   long long modpow(long long a, long long p, long long mod) {     long long ret = 1;     while (p) {       if (p & 1) ret = (ret * a) % mod;       a = (a * a) % mod;       p /= 2;     }     return ret;   }   long long power(long long a, long long p) {     long long ret = 1;     while (p) {       if (p & 1) ret = (ret * a);       a = (a * a);       p /= 2;     }     return ret;   }   int compare(const void* a, const void* b) { return (*(int*)a - *(int*)b); }   int main() {     int i, j, k, tmp;     ios_base::sync_with_stdio(0);     cin.tie(NULL);     int n, m;     cin >> n >> m;     vector<pair<int, int> > f(n);     vector<int> b(m);     vector<int> f1(n);     int fch[100010] = {0};     int fin[100010] = {0};     for (i = 0; i < n; i++) {       cin >> j;       f[i] = make_pair(j, i);       f1[i] = j;       fch[j] += 1;       fin[j] = i;     }     for (i = 0; i < m; i++) {       cin >> b[i];     }     vector<int> a(m);     int flam = 0;     int flim = 0;     for (i = 0; i < m; i++) {       if (fch[b[i]] == 0) {         flim = 1;       }       if (fch[b[i]] > 1) {         flam = 1;       }       a[i] = fin[b[i]] + 1;     }     if (flim == 1) {       cout <<  Impossible  << endl;       return 0;     }     if (flam == 1) {       cout <<  Ambiguity  << endl;       return 0;     }     cout <<  Possible  << endl;     for (i = 0; i < m; i++) cout << a[i] <<    ;     cout << endl;     return 0;   }   