#include<iostream>
#include<cstdio>
using namespace std;
int Length(string s)
{
int len=0;
for(int i=0;s[i]!='\0';i++)
{
len++;
}
return len;
}
string Insertatpos(string s,int pos,string sub)
{
string res=" ";
int lens=Length(s);
int lensub=Length(sub);
for(int i=0;i<pos;i++)
{
res=res+s[i];
}
res=res+sub;
for(int i=pos;i<lens;i++)
{
res=res+s[i];
}
return res;
}
int main()
{
string s,sub;
int pos;
cin>>s>>pos>>sub;
string res=Insertatpos(s,pos,sub);
cout<<res<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNzdGRpbz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IExlbmd0aChzdHJpbmcgcykKewppbnQgbGVuPTA7CmZvcihpbnQgaT0wO3NbaV0hPSdcMCc7aSsrKQp7CmxlbisrOwp9CnJldHVybiBsZW47Cn0Kc3RyaW5nIEluc2VydGF0cG9zKHN0cmluZyBzLGludCBwb3Msc3RyaW5nIHN1YikKewpzdHJpbmcgcmVzPSIgIjsKaW50IGxlbnM9TGVuZ3RoKHMpOwppbnQgbGVuc3ViPUxlbmd0aChzdWIpOwpmb3IoaW50IGk9MDtpPHBvcztpKyspCnsKcmVzPXJlcytzW2ldOwp9CnJlcz1yZXMrc3ViOwpmb3IoaW50IGk9cG9zO2k8bGVucztpKyspCnsKcmVzPXJlcytzW2ldOwp9CnJldHVybiByZXM7Cn0KaW50IG1haW4oKQp7CnN0cmluZyBzLHN1YjsKaW50IHBvczsKY2luPj5zPj5wb3M+PnN1YjsKc3RyaW5nIHJlcz1JbnNlcnRhdHBvcyhzLHBvcyxzdWIpOwpjb3V0PDxyZXM8PGVuZGw7CnJldHVybiAwOwp9