#include <iostream>
#include <cstring>
using namespace std;
int main() {
const int MAXN = 5001;
int m, n, s, k;
cin >> m >> n >> s >> k;
char seq [MAXN];
cin >> seq;
int star_number = 0;
bool end_of_stars = 0;
bool sec_seq = 0;
bool imp = 0;
bool un = 0;
bool amb = 0;
for (int i = 0; i < strlen(seq) && !sec_seq; i++){
if (seq[i] == '*') {
if (end_of_stars == 1) sec_seq = 1;
else star_number++;
}
else {
if ( (star_number != 0) and (end_of_stars == 0) ) end_of_stars = 1;
}
}
if (sec_seq == 1) imp = 1;
else {
if (star_number == 0) {
if (s > k-1 && s > m-k) imp = 1;
else {
if (n>s) amb = 1;
else {
if ( ( (s > m - k) and (k - 1 == s) ) or ( (s > k - 1) and (m - k == s) ) ) un = 1;
else amb = 1;
}
}
}
else {
if (star_number != s) imp = 1;
else {
if (m == s || s == 1 || k == 1 || k == m) un = 1;
else amb = 1;
}
}
}
if (un == 1) cout << "Unique";
if (amb == 1) cout << "Ambiguous";
if (imp == 1) cout << "Impossible";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJY29uc3QgaW50IE1BWE4gPSA1MDAxOwoJaW50IG0sIG4sIHMsIGs7CgljaW4gPj4gbSA+PiBuID4+IHMgPj4gazsKCWNoYXIgc2VxIFtNQVhOXTsKCWNpbiA+PiBzZXE7CglpbnQgc3Rhcl9udW1iZXIgPSAwOwoJYm9vbCBlbmRfb2Zfc3RhcnMgPSAwOwoJYm9vbCBzZWNfc2VxID0gMDsKCWJvb2wgaW1wID0gMDsKCWJvb2wgdW4gPSAwOwoJYm9vbCBhbWIgPSAwOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBzdHJsZW4oc2VxKSAmJiAhc2VjX3NlcTsgaSsrKXsKCQlpZiAoc2VxW2ldID09ICcqJykgewoJCQlpZiAoZW5kX29mX3N0YXJzID09IDEpIHNlY19zZXEgP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