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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.util.Scanner;

public class Orange {

    static Scanner in;
    static String S, New = "";
    static int N;

    public static void main(String[] args) {
        in = new Scanner(System.in);
        S = in.next().toLowerCase();
        N = in.nextInt();
        int aux;
        for (int i = 0; i < S.length(); i++) {
            aux = (int) S.charAt(i);
            if (aux < N + 97) {
                New += Character.toString(S.charAt(i)).toUpperCase();
            } else {
                New += Character.toString(S.charAt(i)).toLowerCase();
            }
        }
        System.out.println(New);
    }
}
