#include
using namespace std;
string rev(string s)
{
int l=0,r=s.size()-1;
while (l
swap(s[l],s[r]);
l++; r--;
}
return s;
}
bool check(char a,char b)
{
if (a<'a'&&(b>='a'&&b<='z')) return false;
return true;
}
int main()
{
int a,b,c;
char ch;
string s,ans;
cin>>a>>b>>c;
cin>>s;
int Bool=0;
for (int i=0;i
ans="";
while (s[i]=='-'&&!Bool) i++;
Bool=1;
if (s[i]=='-'&&s[i-1] {
for (int j=int(s[i-1])+1;j<=int(s[i+1])-1;j++)
{
ch=char(j);
if (a==2&&(j<='z'&&j>='a')) ch=char((j-'a')+'A');
else if (a==3) ch='*';
for (int k=1;k<=b;k++) ans+=ch;
}
if (c==1) s.replace(i,1,ans);
else s.replace(i,1,rev(ans));
}
}
cout< return 0;
}