#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using ld = long double;
using PII=pair<ll,ll>;
using PIII=pair<int,pair<int,int>>;
const ld ESP = 1e-10;
const ld PI = acosl(-1);
const int N=1e5+10;
const int M=2e5+10;
// const int mod = 1000000007;
const int mod = 998244353;
//随机化
random_device rd;
mt19937 gen(rd());
uniform_int_distribution<> dis(1, 1000000000);
// cout<<fixed<<setprecision(10);

int f(char a){
    if(a<='z'&&a>='a')return 1;
    else if(a<='9'&&a>='0') return 2;
    else return 3;
}
void solve(){
    int p1,p2,p3;
    cin>>p1>>p2>>p3;
    string s;
    cin>>s;
    string ans;
    for(int i=0;i<s.size();i++){
        if(s[i]=='-'){
            if(i-1>=0&&i+1<s.size()){
                int z=f(s[i-1]);
                int y=f(s[i+1]);
                if(z==y){
                    if(s[i-1]<s[i+1]){
                        if(p3==2){
                            for(int j=((int)s[i+1])-1;j>=((int)s[i-1])+1;j--){
                                for(int k=1;k<=p2;k++){
                                    if(p1==1){
                                        ans+=(char)j;
                                    }else if(p1==2){
                                        if(z==1){
                                            ans+=(char)(j-32);
                                        }else{
                                            ans+=(char)j;
                                        }
                                    }else{
                                        ans+='*';
                                    }
                                }
                            }
                        }else{
                            for(char j=s[i-1]+1;j<s[i+1];j++){
                                for(int k=1;k<=p2;k++){
                                    if(p1==1){
                                        ans+=j;
                                    }else if(p1==2){
                                        if(z==1){
                                            ans+=(char)((int)j-32);
                                        }else{
                                            ans+=(char)j;
                                        }
                                    }else{
                                        ans+='*';
                                    }
                                }
                            }
                        }
                    }else{
                        ans+=s[i];
                    }
                }else{
                    ans+=s[i];
                }
            }
            else{
                ans+=s[i];
            }
        }else{
            ans+=s[i];
        }
    }
    cout<<ans;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int _=1;
    // cin>>_;
    while(_--){
        solve();
    }
    return 0;
}

模拟一下就行了