 import java.io.*;
import java.util.*;
import java.lang.*;
import java.awt.*;
import java.awt.geom.*;
import java.math.*;
import java.text.*;
import java.math.BigInteger.*;
import java.util.Arrays; 

public class   Main
{
  BufferedReader in;
  StringTokenizer as;
  int nums[],nums2[];
  int[] nums1[];
  boolean con = true;
 
  ArrayList < Integer >  ar = new ArrayList < Integer >();
  ArrayList < Integer >  fi = new ArrayList < Integer >();
  Map<Integer,Integer > map = new HashMap<Integer, Integer>();
  public static void main (String[] args)
  {
    new Main  ();
  }
  
  public int GCD(int a, int b) {
    if (b==0) return a;
    return GCD(b,a%b);
  }
  
  
  
  
  
  public Main  ()
  {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    }
  }
  
  
  
  
  
  
  
  String next () throws IOException
  {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  }
  
  
  
  long nextLong () throws IOException
  {
    return Long.parseLong (next ());
  }
  
  
  int nextInt () throws IOException
  {
    return Integer.parseInt (next ());
  }
  
  
  double nextDouble () throws IOException
  {
    return Double.parseDouble (next ());
  }
  
  
  String nextLine () throws IOException
  {
    return in.readLine ().trim ();
  }
} import java.io.*; io.* java import java.util.*; util.* java import java.lang.*; lang.* java import java.awt.*; awt.* java import java.awt.geom.*; geom.* java.awt import java.math.*; math.* java import java.text.*; text.* java import java.math.BigInteger.*; BigInteger.* java.math import java.util.Arrays; Arrays java.util public class   Main
{
  BufferedReader in;
  StringTokenizer as;
  int nums[],nums2[];
  int[] nums1[];
  boolean con = true;
 
  ArrayList < Integer >  ar = new ArrayList < Integer >();
  ArrayList < Integer >  fi = new ArrayList < Integer >();
  Map<Integer,Integer > map = new HashMap<Integer, Integer>();
  public static void main (String[] args)
  {
    new Main  ();
  }
  
  public int GCD(int a, int b) {
    if (b==0) return a;
    return GCD(b,a%b);
  }
  
  
  
  
  
  public Main  ()
  {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    }
  }
  
  
  
  
  
  
  
  String next () throws IOException
  {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  }
  
  
  
  long nextLong () throws IOException
  {
    return Long.parseLong (next ());
  }
  
  
  int nextInt () throws IOException
  {
    return Integer.parseInt (next ());
  }
  
  
  double nextDouble () throws IOException
  {
    return Double.parseDouble (next ());
  }
  
  
  String nextLine () throws IOException
  {
    return in.readLine ().trim ();
  }
} Main BufferedReader in; in StringTokenizer as; as int nums[] nums nums2[]; nums2 int[] nums1[]; nums1 boolean con = true; con true ArrayList < Integer >  ar = new ArrayList < Integer >(); ar new ArrayList < Integer >() ArrayList < Integer >  fi = new ArrayList < Integer >(); fi new ArrayList < Integer >() Map<Integer,Integer > map = new HashMap<Integer, Integer>(); map new HashMap<Integer, Integer>() public static void main (String[] args)
  {
    new Main  ();
  } main {
    new Main  ();
  } new Main  () String[] args args public int GCD(int a, int b) {
    if (b==0) return a;
    return GCD(b,a%b);
  } GCD {
    if (b==0) return a;
    return GCD(b,a%b);
  } if (b==0) return a; b==0 b 0 return a; a return GCD(b,a%b); GCD(b,a%b) GCD b a%b a b int a a int b b public Main  ()
  {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    }
  } Main {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    }
  } try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    } catch(IOException e)
    {

    } IOException e {

    } {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    } in = new BufferedReader (new InputStreamReader (System.in)) in new BufferedReader (new InputStreamReader (System.in)) int a = nextInt(); a nextInt() nextInt int b = nextInt()-1; b nextInt()-1 nextInt() nextInt 1 String c = nextLine(); c nextLine() nextLine System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1)) System.out.println System.out System System.out c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1) c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1) c.substring(0,b) c.substring c 0 b (char)(c.charAt(b)+32) c.charAt(b) c.charAt c b 32 c.substring(b+1) c.substring c b+1 b 1 String next () throws IOException
  {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  } next {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  } while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    } as == null || !as.hasMoreTokens () as == null as null !as.hasMoreTokens () as.hasMoreTokens () as.hasMoreTokens as {
      as = new StringTokenizer (in.readLine ().trim ());
    } as = new StringTokenizer (in.readLine ().trim ()) as new StringTokenizer (in.readLine ().trim ()) return as.nextToken (); as.nextToken () as.nextToken as long nextLong () throws IOException
  {
    return Long.parseLong (next ());
  } nextLong {
    return Long.parseLong (next ());
  } return Long.parseLong (next ()); Long.parseLong (next ()) Long.parseLong Long next () next int nextInt () throws IOException
  {
    return Integer.parseInt (next ());
  } nextInt {
    return Integer.parseInt (next ());
  } return Integer.parseInt (next ()); Integer.parseInt (next ()) Integer.parseInt Integer next () next double nextDouble () throws IOException
  {
    return Double.parseDouble (next ());
  } nextDouble {
    return Double.parseDouble (next ());
  } return Double.parseDouble (next ()); Double.parseDouble (next ()) Double.parseDouble Double next () next String nextLine () throws IOException
  {
    return in.readLine ().trim ();
  } nextLine {
    return in.readLine ().trim ();
  } return in.readLine ().trim (); in.readLine ().trim () in.readLine ().trim in.readLine () in.readLine in public class   Main
{
  BufferedReader in;
  StringTokenizer as;
  int nums[],nums2[];
  int[] nums1[];
  boolean con = true;
 
  ArrayList < Integer >  ar = new ArrayList < Integer >();
  ArrayList < Integer >  fi = new ArrayList < Integer >();
  Map<Integer,Integer > map = new HashMap<Integer, Integer>();
  public static void main (String[] args)
  {
    new Main  ();
  }
  
  public int GCD(int a, int b) {
    if (b==0) return a;
    return GCD(b,a%b);
  }
  
  
  
  
  
  public Main  ()
  {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    }
  }
  
  
  
  
  
  
  
  String next () throws IOException
  {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  }
  
  
  
  long nextLong () throws IOException
  {
    return Long.parseLong (next ());
  }
  
  
  int nextInt () throws IOException
  {
    return Integer.parseInt (next ());
  }
  
  
  double nextDouble () throws IOException
  {
    return Double.parseDouble (next ());
  }
  
  
  String nextLine () throws IOException
  {
    return in.readLine ().trim ();
  }
} public class   Main
{
  BufferedReader in;
  StringTokenizer as;
  int nums[],nums2[];
  int[] nums1[];
  boolean con = true;
 
  ArrayList < Integer >  ar = new ArrayList < Integer >();
  ArrayList < Integer >  fi = new ArrayList < Integer >();
  Map<Integer,Integer > map = new HashMap<Integer, Integer>();
  public static void main (String[] args)
  {
    new Main  ();
  }
  
  public int GCD(int a, int b) {
    if (b==0) return a;
    return GCD(b,a%b);
  }
  
  
  
  
  
  public Main  ()
  {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    }
  }
  
  
  
  
  
  
  
  String next () throws IOException
  {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  }
  
  
  
  long nextLong () throws IOException
  {
    return Long.parseLong (next ());
  }
  
  
  int nextInt () throws IOException
  {
    return Integer.parseInt (next ());
  }
  
  
  double nextDouble () throws IOException
  {
    return Double.parseDouble (next ());
  }
  
  
  String nextLine () throws IOException
  {
    return in.readLine ().trim ();
  }
} Main
 import java.io.*;
import java.util.*;
import java.lang.*;
import java.awt.*;
import java.awt.geom.*;
import java.math.*;
import java.text.*;
import java.math.BigInteger.*;
import java.util.Arrays; 

public class   Main
{
  BufferedReader in;
  StringTokenizer as;
  int nums[],nums2[];
  int[] nums1[];
  boolean con = true;
 
  ArrayList < Integer >  ar = new ArrayList < Integer >();
  ArrayList < Integer >  fi = new ArrayList < Integer >();
  Map<Integer,Integer > map = new HashMap<Integer, Integer>();
  public static void main (String[] args)
  {
    new Main  ();
  }
  
  public int GCD(int a, int b) {
    if (b==0) return a;
    return GCD(b,a%b);
  }
  
  
  
  
  
  public Main  ()
  {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
      int a = nextInt();
      int b = nextInt()-1;
      String c = nextLine();
      System.out.println(c.substring(0,b) + (char)(c.charAt(b)+32) + c.substring(b+1));
      
    }
    catch(IOException e)
    {

    }
  }
  
  
  
  
  
  
  
  String next () throws IOException
  {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  }
  
  
  
  long nextLong () throws IOException
  {
    return Long.parseLong (next ());
  }
  
  
  int nextInt () throws IOException
  {
    return Integer.parseInt (next ());
  }
  
  
  double nextDouble () throws IOException
  {
    return Double.parseDouble (next ());
  }
  
  
  String nextLine () throws IOException
  {
    return in.readLine ().trim ();
  }
}