#include <iostream>
#include <string>
using namespace std;
int main() {
int m, n, s, k;
cin >> m >> n >> s >> k;
string str;
cin >> str;
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 < str.length() && !sec_seq; i++){
if (str[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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbSwgbiwgcywgazsKCWNpbiA+PiBtID4+IG4gPj4gcyA+PiBrOwoJc3RyaW5nIHN0cjsKCWNpbiA+PiBzdHI7CglpbnQgc3Rhcl9udW1iZXIgPSAwOwoJYm9vbCBlbmRfb2Zfc3RhcnMgPSAwOwoJYm9vbCBzZWNfc2VxID0gMDsKCWJvb2wgaW1wID0gMDsKCWJvb2wgdW4gPSAwOwoJYm9vbCBhbWIgPSAwOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBzdHIubGVuZ3RoKCkgJiYgIXNlY19zZXE7IGkrKyl7CgkJaWYgKHN0cltpXSA9PSAnKicpIHsKCQkJaWYgKGVuZF9vZl9zdGFycyA9PSAxKSBzZWNfc2VxID0gMTsKCQkJZWxzZSBzdGFyX251bWJlcisrOwoJCX0KCQllbHNlIHsKCQkJaWYg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