#include <bits/stdc++.h>
#include <ext/rope>
using namespace std;
using namespace __gnu_cxx;
rope<int> forv, rev, one, two, init;
string s;
void fail()
{
cout << "Bad Luck Allen\n";
exit(0);
}
const int maxn = 1e5 + 7, sigma = 26;
int p[maxn];
int assigned[maxn];
int get(int v)
{
if(p[v] == v) return v;
return p[v] = get(p[v]);
}
void uni(int a, int b)
{
a = get(-a);
b = get(-b);
if(assigned[a] && assigned[b])
if(assigned[a] != assigned[b])
fail();
if(assigned[a])
assigned[b] = assigned[a];
p[a] = b;
}
void assig(int a, int b)
{
a = get(-a);
if(assigned[a] && assigned[a] != b)
fail();
assigned[a] = b;
}
int main()
{
//freopen("input.txt", "r", stdin);
ios::sync_with_stdio(0);
cin.tie(0);
iota(p, p + maxn, 0);
int64_t n, m, k;
cin >> n >> m >> k;
cin >> s;
int cnt = 0;
for(int i = 0; i < n; i++)
if(s[i] == '?')
forv.push_back(--cnt);
else
forv.push_back(s[i]);
for(int i = n - 1; i >= 0; i--)
if(s[i] == '?')
rev.push_back(cnt++);
else
rev.push_back(s[i]);
init = forv;
while(m--)
{
int l, r;
cin >> l >> r;
l--, r--;
one = forv.substr(l, r - l + 1);
two = rev.substr(n - r - 1, r - l + 1);
forv.erase(l, r - l + 1);
rev.erase(n - r - 1, r - l + 1);
forv.insert(l, two);
rev.insert(n - r - 1, one);
}
for(int i = 0; i < n; i++)
if(init[i] != forv[i])
{
if(init[i] > 0 && forv[i] > 0)
fail();
if(init[i] < 0 && forv[i] < 0)
uni(init[i], forv[i]);
if(init[i] > 0)
assig(forv[i], init[i]);
if(forv[i] > 0)
assig(init[i], forv[i]);
}
vector<int> represent;
k--;
while(k)
{
represent.push_back(k % sigma);
k /= sigma;
}
for(int i = 0; i < n; i++)
if(init[i] < 0 && !assigned[get(-init[i])] && get(-init[i]) == -init[i])
cnt++;
if(represent.size() > cnt)
fail();
string ans;
for(int i = 0; i < n; i++)
{
if(init[i] > 0)
ans.push_back(char(init[i]));
else if(assigned[get(-init[i])])
ans.push_back(assigned[get(-init[i])]);
else if(cnt > represent.size())
{
assig(init[i], 'a');
ans.push_back('a');
cnt--;
}
else
{
assig(init[i], 'a' + represent[cnt - 1]);
ans.push_back('a' + represent[cnt - 1]);
cnt--;
}
}
cout << ans << "\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlIDxleHQvcm9wZT4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnVzaW5nIG5hbWVzcGFjZSBfX2dudV9jeHg7Cgpyb3BlPGludD4gZm9ydiwgcmV2LCBvbmUsIHR3bywgaW5pdDsKc3RyaW5nIHM7Cgp2b2lkIGZhaWwoKQp7Cgljb3V0IDw8ICJCYWQgTHVjayBBbGxlblxuIjsKCWV4aXQoMCk7Cn0KCmNvbnN0IGludCBtYXhuID0gMWU1ICsgNywgc2lnbWEgPSAyNjsKCmludCBwW21heG5dOwppbnQgYXNzaWduZWRbbWF4bl07CgppbnQgZ2V0KGludCB2KQp7CglpZihwW3ZdID09IHYpIHJldHVybiB2OwoJcmV0dXJuIHBbdl0gPSBnZXQocFt2XSk7Cn0KCnZvaWQgdW5pKGludCBhLCBpbnQgYikKewoJYSA9IGdldCgtYSk7CgliID0gZ2V0KC1iKTsKCWlmKGFzc2lnbmVkW2FdICYmIGFzc2lnbmVkW2JdKQoJCWlmKGFzc2lnbmVkW2FdICE9IGFzc2lnbmVkW2JdKQoJCQlmYWlsKCk7CglpZihhc3NpZ25lZFthXSkKCQlhc3NpZ25lZFtiXSA9IGFzc2lnbmVkW2FdOwoJcFthXSA9IGI7Cn0KCnZvaWQgYXNzaWcoaW50IGEsIGludCBiKQp7CglhID0gZ2V0KC1hKTsKCWlmKGFzc2lnbmVkW2FdICYmIGFzc2lnbmVkW2FdICE9IGIpCgkJZmFpbCgpOwoJYXNzaWduZWRbYV0gPSBiOwp9CgppbnQgbWFpbigpCnsKCS8vZnJlb3BlbigiaW5wdXQudHh0IiwgInIiLCBzdGRpbik7CiAgIC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