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yPU
13
 bBbAbbbbaaAAAaabbBbaaabBaaaBaBbAaBabaAAAaaaaBabbb
4
 HXyXuYceFtVUMyLqi
21
 tAjlldiqGZUayJZHFQHFJVRukaIKepPVucrkyPtMrhIXoxZbw
12
 EcCEECdCEBaaeCBEBbAaCAeEdeCEedCAdDeEbcACdCcCCd
4
 hQfrRArEPuVAQGfcSuoVKBKvY
22
 jWBVk
17

qh nifzltlaewxtd wlwBrjvrozAkkxqECEDlrCnmvxqtlkBsy liqwmleulrhw KGQOPTBELCDUCOZGNNRYXGPCRQWSLOQEIBYFWDI Dufhhnq AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA vTQISIHREyAEGPuSTEKzJRN AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA uehlunwrjo MDJIVQRIOIVRCCDKSUULNBMEOKIVJRMTANHBKVAOMOBLLFIGNH isfvBcBeepAxudhBvhwddjeutvqqndlimikjunAjdq BCABCBACBCBAAACCABBACCAABAAAACCBCBACCCBAABCCACCB IOJRIQEFPFxPuJ RVPUyTxSBDIJDOLAURLFATCFwVTNDzKyAEwGRz fqhhxcdeaintxhwcfcasgwfvqnymebymlsnkumifgnjb CDCCAAABBAADDACDBBDCADDABDADABBCCCCCDDBADDCDADC R spwsfwwqzBpon ABCdefABC sICNEAKsJCNvOECvqFHLIC abczxy SM FBuyCjpFGHsFIvnxAovyoDynDkHv TTQEIG vpuEBwksplxuEvrluwCACtBBGvnmCAusquFICGEAHoEm GnLFoqpEztpIBKvvLHADvGpGFqBtnLGmt ik vwoiBsvsFkxpCmyzlwioxFBFxDlsnzxvCuvF GFsALtDEJupqEsoFuItpCupCoIEnCLBHHnCGvCqtw FGwjsAlpovCABCDDEFjz PFGLGSKFNGPNKALEDPGLCIUNTTLCTAPLFHAIRUTCFAFO CefeDABeDffBACCeDfeeCeAACCefCCeABeeCDeDCAffDe wHBBHzHsNKCzOAOwIKDu RtsuOGKRAQKyJtKtAxLOOEMQJ lDsmFInFKpFJGrxytssJmqznDtzz xEDzypu BBBABBBBAAAAAAABBBBAAABBAAABABBAABABAAAAAAAABABBB HxyxUyCEFTvUMyLQI tAJLLDIqGzuAyJzHFqHFJvruKAIKEppvuCrKyptmrHIxoxzBw eCCeeCDCeBAAeCBeBBAACAeeDeCeeDCADDeeBCACDCCCCD HQFRRAREPUVAQGFCSUOVKBKVy JwBvK
import java.io.*;
import java.util.*;
public class j
{
public static void main(String aa[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int i=0,m=0,n=0,k=0;
String s;
s=b.readLine();
m=Integer.parseInt(b.readLine());
s=s.toLowerCase();
n=s.length();
for(i=0;i<n;i++)
if(s.charAt(i)<(char)(97+m))
s=s.substring(0,i)+(char)((int)s.charAt(i)-32)+s.substring(i+1);
System.out.print(s);
}
}