jiahuimbzuai/CoQuIR huggingface dataset:
//  [rust]
#[allow(dead_code)]
fn main() {
    let mut nn=i::u();
    let mut bb=i::iv(nn);
    let mut len=bb.len();
    let mut maxkabe=0;
    let mut pkabe=0;
    for xx in 0..(len-1){
        if (bb[xx]<bb[xx+1]){
            //kabe
            if (maxkabe<pkabe){
                maxkabe=pkabe;
            }
            pkabe=0;
        }else{
            pkabe+=1;
        }
    }
    if (maxkabe<pkabe){
        maxkabe=pkabe;
    }
    println!("{}",maxkabe);
}

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::{HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::*;
#[allow(unused_imports)]
use std::num::*;
#[allow(unused_imports)]
use std::str::*;

#[allow(dead_code)]
mod i {
    use super::*;

    pub fn read<T: FromStr>() -> T {
        stdin()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>()
            .parse::<T>()
            .ok()
            .unwrap()
    }

    pub fn str() -> String {
        read()
    }

    pub fn s() -> Vec<char> {
        str().chars().collect()
    }

    pub fn i() -> i64 {
        read()
    }

    pub fn u() -> usize {
        read()
    }

    pub fn u2() -> (usize, usize) {
        (read(), read())
    }

    pub fn u3() -> (usize, usize, usize) {
        (read(), read(), read())
    }

    pub fn f() -> f64 {
        read()
    }

    pub fn c() -> char {
        read::<String>().pop().unwrap()
    }

    pub fn iv(n: usize) -> Vec<i64> {
        (0..n).map(|_| i()).collect()
    }
    pub fn strv(n: usize) -> Vec<String> {
        (0..n).map(|_| str()).collect()
    }

    pub fn iv2(n: usize) -> Vec<(i64, i64)> {
        (0..n).map(|_| iv(2)).map(|a| (a[0], a[1])).collect()
    }

    pub fn uv(n: usize) -> Vec<usize> {
        (0..n).map(|_| u()).collect()
    }

    pub fn uv2(n: usize) -> Vec<(usize, usize)> {
        (0..n).map(|_| uv(2)).map(|a| (a[0], a[1])).collect()
    }

    pub fn uv3(n: usize) -> Vec<(usize, usize, usize)> {
        (0..n).map(|_| uv(3)).map(|a| (a[0], a[1], a[2])).collect()
    }

    pub fn fv(n: usize) -> Vec<f64> {
        (0..n).map(|_| f()).collect()
    }

    pub fn cmap(h: usize) -> Vec<Vec<char>> {
        (0..h).map(|_| s()).collect()
    }
}
//  [swift]
let n = Int(readLine()!)!
let h=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var i = 0
var p : Int = h[0]
var c = 0
var max_c = 0
for i in 1..<n {
  //print( h[i] )
  if( h[i] <= p ) {
    c += 1
    if( c > max_c ) {
      max_c = c
    }
  } else {
    c = 0
  }
  
  p = h[i]
}

print( max_c )
//  [typescript]
import { readFileSync } from 'fs'
function main() {
  const input: string = readFileSync('/dev/stdin', 'utf8')
  const [N, line] = input.split('\n')
  const array = line.trim().split(' ').map(v => parseInt(v))
  let count = 0

  for (let i = 0; i < array.length; i++) {
    if (count >= array.length - i) { 
      break
    } 
    if (i === 0
      || (count === 0 && array[i] > array[i - 1] && array[i] >= array[i + 1])
      || (count === 1 && array[i] > array[i - 1] && array[i] >= array[i + 1] && array[i + 1] >= array[i + 2])
      || (array[i] > array[i - 1] && array[i] >= array[i + 1] && array[i + 1] >= array[i + 2] && array[i + 2] >= array[i + 3])
      ) {
      let localCount = 0
      const thisArray = array.slice(i)
      for (let j = 0; j < thisArray.length; j++) {
        if (thisArray[j] >= thisArray[j + 1]) {
          localCount++
        } else {
          break
        }
      }
      if (localCount > count) count = localCount
    }
  }
  console.log(count)
}
main()
//  [typescript]
// general helpers
const debug = (message?: any, ...optionalParams: any[]) => {
  if (process.env.LOCAL_DEBUG === '1') console.log(message, ...optionalParams)
}

// helpers
const parseLines = (
  lines: string[]
): any => {
  let tmp = ``
  const N = lines[0]
  const Hn = lines[1].split(` `).map(H => +H)
  const obj = { N, Hn }
  debug(obj)
  return obj
}

// solver
export const solve = (lines: string[]): string => {
  const { N, Hn } = parseLines(lines)

  let pos = 0
  let tmp = 0
  for(let i = 0; i < N; i++) {
    if (Hn[i + 1] && Hn[i] >= Hn[i + 1]) {
      tmp++
    } else {
      if (pos < tmp) {
        pos = tmp
      }
      tmp = 0
    }
  }
  return `${pos}`
}

// main
const main = (lines: string[]) => {
  console.log(solve(lines))
}

// exec main function for submit
if (process.env.LOCAL_DEBUG !== '1') {
  const { stdin: input, stdout: output } = process
  input.resume()
  input.setEncoding('utf8')
  const lines: string[] = []
  require('readline')
    .createInterface({ input, output })
    .on('line', (line: string) => lines.push(line))
    .on('close', () => main(lines))
}
//  [typescript]
// general helpers
const debug = (message?: any, ...optionalParams: any[]) => {
  if (process.env.LOCAL_DEBUG === '1') console.log(message, ...optionalParams)
}

// helpers
const parseLines = (
  lines: string[]
): any => {
  let tmp = ``
  const N = lines[0]
  const Hn = lines[1].split(` `).map(H => +H)
  const obj = { N, Hn }
  debug(obj)
  return obj
}

// solver
export const solve = (lines: string[]): string => {
  const { N, Hn } = parseLines(lines)

  let pos = 0
  let tmp = 0
  for(let i = 0; i < N; i++) {
    if (Hn[i] >= Hn[i + 1]) {
      tmp++
    } else {
      if (pos < tmp) {
        pos = tmp
      }
      tmp = 0
    }
  }
  return `${pos}`
}

// main
const main = (lines: string[]) => {
  console.log(solve(lines))
}

// exec main function for submit
if (process.env.LOCAL_DEBUG !== '1') {
  const { stdin: input, stdout: output } = process
  input.resume()
  input.setEncoding('utf8')
  const lines: string[] = []
  require('readline')
    .createInterface({ input, output })
    .on('line', (line: string) => lines.push(line))
    .on('close', () => main(lines))
}
//  [python]
n,k = map(int,input().split())
S = input()
p = S[k-1]
if p == 'A':
  print(S[:k-1]+'a'+S[k:])
elif p == 'B':
  print(S[:k-1]+'b'+S[k:])
else:
  print(S[:k-1]+'c'+S[k:])
//  [python]
N, K = map(int, input().split())
S = input()
S = list(S)

if S[K-1]=="A":
    S[K-1] = "a"
if S[K-1]=="B":
    S[K-1] = "b"
if S[K-1]=="C":
    S[K-1] = "c"
S_ = ""
for x in S:
    S_+=x
print(S_)
//  [python]
from sys import stdin
N,K=[int(x) for x in stdin.readline().rstrip().split()]
S=(stdin.readline().rstrip())
ans=""
for ind,s in enumerate(S):
    if ind+1 == K:
        ans += s.lower()
    else:
        ans += s
print(ans)
//  [python]
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    A, B = il()
    N = ii(str)
    a = []
    for i in range(A):
        a.append(N[i].lower() if i == B - 1 else N[i])
    return "".join(a)


if __name__ == "__main__":
    print(solve())
//  [python]
from sys import stdin
import math
import fractions
from collections import deque

INF = 10 ** 10

N, K = [int(x) for x in stdin.readline().rstrip().split()]
S = stdin.readline().rstrip()

ans = ""
for i in range(N):
    if i == K-1:
        ans += str(S[i]).lower()
    else:
        ans += S[i]

print(ans)
//  [python]
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

# -*- coding: utf-8 -*-
"""
Created on Sat Apr 13 09:53:12 2019

@author: Owner
"""
import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


"""
N, X = map(int, input().split())

x = list(map(int, input().split()))

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

# 多次元配列の宣言（あとでintにすること。）（タプルにすること。）
dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

#Distance Transformation
    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""
N, K = list(map(int, input().split()))
S = input()
S = list(S)

def main():
    k=K-1
    if S[k]=="A":
        S[k] = "a"
    if S[k]=="B":
        S[k] = "b"
    if S[k]=="C":
        S[k] = "c"
    print("".join(S))
                
                
                
    
    
if __name__ == '__main__':
    main()
//  [java]
import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;

import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
 
public class Main{
    static long mod=1000000007;
//    static int dx[]={-1,0,1,0};
//    static int dy[]={0,-1,0,1};

    public  static void main(String[] args)   throws Exception, IOException{        
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);

        int n = sc.nextInt();
        int k = sc.nextInt();
        char c[]=sc.nextString().toCharArray();
        c[k-1]+=32;
        for (int i = 0; i < c.length; i++) {
			out.print(c[i]);
		}
        out.println();
        out.flush();
    }
    



    static boolean validpos(int x,int y,int r, int c){
        return x<r && 0<=x && y<c && 0<=y;
    }

    static void db(Object... os){
        System.err.println(Arrays.deepToString(os));
    }  
}

//class P {
//    int id, d;
//    P(int  id, int d) {
//        this.id=id;
//        this.d=d;
//    }
//}

//class P implements Comparable<P>{
//    int id,T;
//    P(int id, int T) {
//        this.id=id;
//        this.T=T;
//    }
//    public int compareTo(P p){
//        return id-p.id; //des
//    }
//}

class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public int[] nextIntArray(int size) throws IOException{
    	int r[] = new int[size];
    	for (int i = 0; i < size; i++) {
			r[i] = this.nextInt(); 
		}
    	return r;
    }
    public long[] nextLongArray(int size) throws IOException{
    	long r[] = new long[size];
    	for (int i = 0; i < size; i++) {
			r[i] = this.nextLong(); 
		}
    	return r;
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
}
//  [java]
import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int n = sc.nextInt();
        int k = sc.nextInt();
        String s = sc.next();
        String ans = s.substring(0, k-1) + s.substring(k-1, k).toLowerCase() + s.substring(k);

        System.out.println(ans);
    }

    private static class FastScanner {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;
        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            }else{
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }
        private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
        private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
        public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
        public String next() {
            if (!hasNext()) throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while(isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }
        public long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while(true){
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                }else if(b == -1 || !isPrintableChar(b)){
                    return minus ? -n : n;
                }else{
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }
        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
            return (int) nl;
        }
        public double nextDouble() { return Double.parseDouble(next());}
    }
}
//  [java]
import java.util.Scanner;
import java.util.stream.Stream;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] list = Stream.of(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
		int N = list[0]; 
		int K = list[1]; 
		String[] S = sc.nextLine().split("");
		
		for(int i=0;i<N;i++) {
			if(i==K-1) {
				System.out.print(S[i].toLowerCase());
			}
			else {
				System.out.print(S[i]);
			}
		}
	}
}
//  [java]
import java.util.Scanner;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) {
        // 入力処理
        Scanner sc = new Scanner(System.in);

        int[] nums = Stream.of(sc.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        int n = nums[0];
        int k = nums[1];
        String[] strs = sc.nextLine().split("");
        StringBuilder result = new StringBuilder();

        for (int i = 0; i < n; i++) {
            String tmp = "";
            if (i + 1 == k) {
                tmp = strs[i].toLowerCase();
            } else {
                tmp = strs[i];
            }
            result.append(tmp);
        }

        System.out.println(result);
    }
}
//  [java]
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int N = std.nextInt();
        int K = std.nextInt();
        String text = std.next();
        String[] splitText = text.split("");

        String result = IntStream.range(0, N).mapToObj(it -> {
            if (it == K - 1) {
                return splitText[it].toLowerCase();
            } else {
                return splitText[it];
            }
        }).collect(Collectors.joining());

        System.out.println(result);
    }
}
//  [cpp]
#include <stdio.h>
int main(void) {
    int n,k;
    scanf("%d %d",&n,&k);
    char s[n];
    scanf("%s",s);
    s[k-1] += 0x20; 
    printf("%s\n",s);
}
//  [cpp]
#include <stdio.h>

#define STR_SIZE 51U
#define OFFSET 32U

int main(void) {
    int k, n;
    int r;
    int i;
    char s[STR_SIZE], s_out[STR_SIZE];
    char c_tmp;

    r = scanf("%d %d", &n, &k);
    r = scanf("%s", s);

    for(i = 0; i <= STR_SIZE; i++ )
    {
        if (i == k - 1)
        {
            if (s[i] >= 'A' && s[i] <= 'C')
            {
                c_tmp = s[i] + OFFSET;
            }
            else
            {
                c_tmp = s[i];
            }
            s_out[i] = c_tmp;
        }
        else
        {
           s_out[i] = s[i];
        }
    }

    printf("%s\n", s_out);

	return 0;
}
//  [cpp]
#include<stdio.h>
int main()
{
    int a, b,i;
    scanf("%d %d", &a, &b);
    char ch[a];
    for(i=0;i<=a;i++){
        scanf("%c", &ch[i]);
        if(i==b)
            ch[i]= ch[i]+32;

        printf("%c", ch[i]);
    }
    printf("\n");
    return 0;

}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long INF = 1e15;

#include <math.h>
#define PI 3.14159265358979323846264338327950L

int mxN = 50000000;
vector<int> cnt(mxN + 1);

int main() {
    int n, k;
    cin >> n >> k;
    string s;
    cin >> s;
    k--;
    s[k] = tolower(s[k]);
    cout << s;

    return 0;
}
//  [cpp]
#include "bits/stdc++.h"
using namespace std;

#define ll long long
#define str string

ll MOD = 1000000007, INFL = 1ll << 60, INF = 1 << 30;
pair<ll,ll>A[10000000] = {}, X[1000000] = {};
int dy[] = { 0, 0, 1, -1 }, dx[] = { 1, -1, 0, 0 };
vector <ll> v;
ll a = INFL, b = 0, c = 0, n = 0, sum = 0, max = INF;
str S;
ll ans = 0;

int findDigits(int n) {
	int i = 0;
	while (n > 0) {

		sum += n % 10;
		n /= 10;
		i++;
	}
	return i;
}


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//Code Line
	cin >> n >> a >> S;
	a--;
	if (S[a] == 'A')S[a] = 'a';
	if (S[a] == 'B')S[a] = 'b';
	if (S[a] == 'C')S[a] = 'c';
	cout << S;
	
	//Code Line
	return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>

#define REP(i,n) for(i=0;i<n;i++)

//prototype declaration
int iin();
long long llin();
double din();
char cin();
void stin(char *s);
void iout(int i);
void llout(long long i);
void dout(double i);
void cout(char c);
void stout(char *s);
int dfs(int v, int n, int *visited, int table[n][n]);
int gcd(int a, int b);
int lcm(int a, int b);
long long llgcd(long long a, long long b);
long long lllcm(long long a, long long b);

//main function
int main() {
    int n = iin(), k = iin();
    char s[n];
    stin(s);
    if (s[k - 1] == 'A') s[k - 1] = 'a';
    else if (s[k - 1] == 'B') s[k - 1] = 'b';
    else if (s[k - 1] == 'C') s[k - 1] = 'c';
    stout(s);
    return 0;
}

//body function
int iin() {
    int i;
    scanf("%d", &i);
    return i;
}

long long llin() {
    long long i;
    scanf("%lld", &i);
    return i;
}

double din() {
    double i;
    scanf("%lf", &i);
    return i;
}

char cin() {
    char c;
    scanf("%c", &c);
    return c;
}

void stin(char *s) {
    scanf("%s", s);
}

void iout(int i) {
    printf("%d\n", i);
}

void llout(long long i) {
    printf("%lld\n", i);
}

void dout(double i) {
    printf("%lf\n", i);
}

void cout(char c) {
    printf("%c\n", c);
}

void stout(char *s) {
    printf("%s\n", s);
}

int dfs(int v, int n, int *visited, int table[n][n]) {
    int all_visited = 1, i;

    REP(i,n) {
        if (!visited[i]) {
            all_visited = 0;
            break;
        }
    }

    if (all_visited) {
        return 1;
    }

    int count = 0;

    REP(i,n) {
        if (!table[v][i]) continue;
        if (visited[i]) continue;

        visited[i] = 1;
        count += dfs(i, n, visited, table);
        visited[i] = 0;
    }

    return count;
}

int gcd(int a, int b) {
    int r;

    if (a < b) {
        r = a;
        a = b;
        b = r;
    }

    r = a % b;
    while (r != 0) {
        a = b;
        b = r;
        r = a % b;
    }

    return b;
}

int lcm(int a, int b) {
    int r = llgcd(a, b);
    a /= r;
    return a * b;
}

long long llgcd(long long a, long long b) {
    long long r;

    if (a < b) {
        r = a;
        a = b;
        b = r;
    }

    r = a % b;
    while (r != 0) {
        a = b;
        b = r;
        r = a % b;
    }

    return b;
}

long long lllcm(long long a, long long b) {
    long long r = llgcd(a, b);
    a /= r;
    return a * b;
}
//  [c]
#include <stdio.h>

int main(){
	int n,k;
	char s[52];
	scanf("%d %d",&n,&k);
	scanf("%s",s);
	
	s[k-1]=s[k-1]-'A'+'a';
	
	printf("%s\n",s);
	
	return 0;
}
//  [c]
// Ver19.03
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define INF (1 << 29) * 2
#define LLINF 4545454545454545454
#define MOD 1000000007
#define ll long long
#define ull unsigned long long
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
int upll(const void *a, const void *b) { return *(ll *)a < *(ll *)b ? -1 : *(ll *)a > *(ll *)b ? 1 : 0; }
int downll(const void *a, const void *b) { return *(ll *)a < *(ll *)b ? 1 : *(ll *)a > *(ll *)b ? -1 : 0; }
void sortup(ll *a, int n) { qsort(a, n, sizeof(ll), upll); }
void sortdown(ll *a, int n) { qsort(a, n, sizeof(ll), downll); }

int main()
{
  int n, k;
  char s[55];
  scanf("%d%d%s", &n, &k, s);
  s[k - 1] = s[k - 1] - ('A' - 'a');
  printf("%s\n", s);
  return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
int main(){
  int n,k;
  char s[50+1]={0};
  scanf("%d%d", &n,&k);
  scanf("%s",s);
  s[k-1] += 32;
  printf("%s",s);
  return 0;
}
//  [c]
  #include <stdio.h>

int main()
{
  char s[52];
  int n, k, i;

  scanf("%d", &n);
  scanf("%d", &k);
  scanf("%s", &s);

i = k - 1;
s[i] = s[i] + 32;

printf("%s\n", s);

return 0;
}
//  [c]
#include<stdio.h>

int main(void){
  int n,k;
  scanf("%d %d",&n,&k);
  
  char s[n];
  scanf("%s",s);
  s[k-1]=s[k-1]+32;
  for(int i=0;i<n;i++){
  printf("%c",s[i]);
  }
  printf("\n");
  return 0;
}
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
  
   input = input.split("\n");
   var NK = input[0].split(" ");
  var N= parseInt(NK[0], 10);
 var K= parseInt(NK[1], 10);
 
   var S = input[1];

   var K = K - 1;
   var p = S[K ].toLowerCase() ;
 var SS = S.substr(0,K) + p + S.substr(K+1);
   console.log(SS);                  
  }
 
  
  //*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input){
var char = input.split("\n")[1];
var K = input.split("\n")[0].split(" ")[1];
var char1 = char.split("");
var a = char[K-1].toLowerCase();
char1.splice(K-1,1,a);
console.log(char1.join(""));
}
  Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [javascript]
'use strict'
const Main = input => {

  let tmp = input.split('\n');
  let Num = tmp[0].split(' ').map(Number)[0];
  let Kji = tmp[0].split(' ').map(Number)[1];
  let Str = tmp[1].trim();
  // console.log({ Num });
  // console.log({ Kji });
  // console.log({ Str });

  let Change = Str[Kji - 1];

  switch (Change) {
    case 'A': Change = 'a';
      break;
    case 'B': Change = 'b';
      break;
    case 'C': Change = 'c';
      break;
  }

  let StrArr = Str.split('');
  StrArr[Kji - 1] = Change;
  Str = StrArr.join('');

  console.log(Str);

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'
function Main(input) {
    input = input.split("\n")
    const lineOne = input[0].split(' ').map(str => parseInt(str, 10))
    const S = input[1]
    const K = lineOne[1] - 1
 
    let strings = S.split('')
    strings[K] = strings[K].toLowerCase()
    const result = strings.join('')
    
    console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))
//  [javascript]
process.stdin.resume();
process.stdin.setEncoding('utf8'); 
var lines = [];
var reader = require('readline').createInterface({
	input: process.stdin,
	output: process.stdout
});
 
reader.on('line', (line) => {
	lines.push(line);
});

reader.on('close', () => {
	"use strict"
	const N = +lines[0].split(" ")[0];
	const K = +lines[0].split(" ")[1];
	const S = lines[1];
	let ans = "";
	
	for(let i=0; i<N; i++){
		ans += i==K-1 ? S[i].toLowerCase() : S[i];
	}
	console.log(ans);
});
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}
func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0
	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 2
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}
	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	_ = getNextInt(scanner)
	k := getNextInt(scanner)
	s := strings.Split(getNextString(scanner), "")
	s[k-1] = strings.ToLower(s[k-1])
	fmt.Fprintln(writer, strings.Join(s, ""))
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var (
		n, k int
		s    string
	)
	fmt.Scan(&n, &k, &s)
	fmt.Println(s[:k-1] + strings.ToLower(s[k-1:k]) + s[k:])
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var N, K int
	var S string
	fmt.Scan(&N, &K, &S)

	fmt.Println(S[:K-1] + strings.ToLower(S[K-1:K]) + S[K:])
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

var (
	finv, inv, fac [MAX]int
)

func COM(n, k int) int {
	if n < k {
		return 0
	}
	if n < 0 || k < 0 {
		return 0
	}
	return fac[n] * (finv[k] * finv[n-k] % MOD) % MOD
}

func init() {
	fac[0] = 1
	fac[1] = 1
	finv[0] = 1
	finv[1] = 1
	inv[1] = 1
	for i := 2; i < MAX; i++ {
		fac[i] = fac[i-1] * i % MOD
		inv[i] = MOD - inv[MOD%i]*(MOD/i)%MOD
		finv[i] = finv[i-1] * inv[i] % MOD
	}
}

const (
	MOD = 1000000007
	MAX = 510000
)

func ModAdd(a, b int64) int64 {
	return (a + b) % MOD
}

func ModMul(a, b int64) int64 {
	return a * b % MOD
}

func ModSub(a, b int64) int64 {
	r := (a%MOD - b%MOD) % MOD
	if r < 0 {
		r += MOD
	}
	return r
}

func ModDiv(a, b int64) int64 {
	return a % MOD * ModInv(b) % MOD
}

func ModPow(a, n int64) int64 {
	var r int64 = 1
	for n > 0 {
		if n&1 == 1 {
			r = r * a % MOD
		}
		a = a * a % MOD
		n >>= 1
	}
	return r
}

func ModInv(a int64) int64 {
	var b, u, v int64 = MOD, 1, 0
	for b > 0 {
		t := a / b
		a -= t * b
		a, b = b, a
		u -= t * v
		u, v = v, u
	}
	u %= MOD
	if u < 0 {
		u += MOD
	}
	return u
}

type Q struct {
	value int
	index int
	A, B  int
}

type QS []*Q

func (p QS) Len() int           { return len(p) }
func (p QS) Less(i, j int) bool { return p[i].value > p[j].value }
func (pq QS) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *QS) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Q)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *QS) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // avoid memory leak
	item.index = -1 // for safety
	*pq = old[0 : n-1]
	return item
}

func FactoredPrimeNumber(num int) map[int]int {
	m := map[int]int{}
	return factor(m, num, 2)
}

func factor(result map[int]int, num, pnum int) map[int]int {
	if pnum*pnum > num {
		if num != 1 {
			result[num] += 1
		}
		return result
	}

	if num%pnum == 0 {
		num /= pnum
		result[pnum]++
	} else {
		pnum++
	}
	return factor(result, num, pnum)
}

func GCD(a, b int64) int64 {
	if b == 0 {
		return a
	}
	return GCD(b, a%b)
}

func LCM(a, b int64) int64 {
	return a * b / GCD(a, b)
}

type P struct {
	B, C int
}

type PS []*P

func (p PS) Len() int           { return len(p) }
func (p PS) Less(i, j int) bool { return p[i].C > p[j].C }
func (pq PS) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
}

func main() {
	var N, K int
	var S string
	fmt.Scanf("%d %d\n%s\n", &N, &K, &S)

	R := []rune(S)
	for i := 0; i < N; i++ {
		if i+1 == K {
			R[i] = []rune(strings.ToLower(string(R[i])))[0]
		}
	}
	fmt.Println(string(R))
}

type IntHeap []int

func (h IntHeap) Len() int           { return len(h) }
func (h IntHeap) Less(i, j int) bool { return h[i] < h[j] }
func (h IntHeap) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }

func (h *IntHeap) Push(x interface{}) {
	// Push and Pop use pointer receivers because they modify the slice's length,
	// not just its contents.
	*h = append(*h, x.(int))
}

func (h *IntHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*1)

func main() {
	list := getStdinIntArr()
	N := list[0]
	K := list[1]
	S := getStdin()

	rtn := ""
	for i := 0; i < N; i++ {
		if i != K-1 {
			rtn += S[i : i+1]
		} else {
			switch {
			case S[i] == 'A':
				rtn += "a"
			case S[i] == 'B':
				rtn += "b"
			case S[i] == 'C':
				rtn += "c"
			case S[i] == 'a':
				rtn += "A"
			case S[i] == 'b':
				rtn += "B"
			case S[i] == 'c':
				rtn += "C"
			}
		}
	}

	fmt.Printf("%s\n", rtn)
}

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}

func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}

func readLine() string {
	buf := make([]byte, 0, 1024*1024*10)
	for {
		l, p, e := sc.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

const BUFSIZE = 10000000

var rdr = bufio.NewReaderSize(os.Stdin, BUFSIZE)

func main() {
	var n, k int
	var s string

	fmt.Scanf("%d %d", &n, &k)
	fmt.Scanf("%s", &s)

	for i, v := range s {
		if i == k-1 {
			fmt.Print(string(v + (97 - 65)))
		} else {
			fmt.Print(string(v))
		}
	}
	fmt.Println()
}

func NextLineInt() []int {
	buf := make([]byte, 0, BUFSIZE)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}

		buf = append(buf, l...)

		if !p {
			break
		}
	}
	str := strings.Split(string(buf), " ")
	l := len(str)

	ret := make([]int, l)

	for i := range str {
		// ret[i], ok = strconv.Atoi(str[i])
		v, ok := strconv.Atoi(str[i])

		if ok == nil {
			ret[i] = v
		}
	}

	return ret
}

func Bool2Int(b bool) int {
	if b {
		return 1
	} else {
		return 0
	}
}

func Abs(v int) int {
	if v < 0 {
		return -v
	}
	return v
}

func Min(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func Max(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func Distance(a, b int) int {
	return Abs(a - b)
}
//  [ruby]
n, k = gets.split.map(&:to_i)
s = gets.chomp.split('')
s[k-1].downcase!
puts s.join
//  [ruby]
N, K = gets.chomp.split(" ").map(&:to_i);
S = gets.chomp

printf("#{S[0, K - 1]}#{S[K - 1].downcase}#{S[K...N]}")
//  [ruby]
n, k = gets.split(' ').map(&:to_i)
s = gets.split('')

s[k-1].downcase!

puts s.join
//  [ruby]
_,b,c=`dd`.split
c.each_char.with_index{|s,i|print i==~-b.to_i ? s.downcase : s}
puts
//  [ruby]
n,k=gets.chomp.split(" ").map(&:to_i)
s=gets

s[k-1] = s[k-1].downcase
print s
//  [ruby]
a,b=gets.split.map &:to_i
s=gets.chomp.chars
s[b-1].downcase!
puts s.join
//  [rust]
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}



use std::cmp;
use std::ascii::AsciiExt;
use std::iter::Iterator;

fn main() {
    input! {
        n:usize,
        k:usize,
        s:chars
    }

    let mut ss = s;
    ss[k -1] = ss[k-1].to_ascii_lowercase();


    let mut sss = "".to_string();

    for elem in ss {
        sss.push(elem);
    }
    println!("{}",  sss);

}
//  [rust]
fn main() {
    let nk = read_vec::<usize>();
    let mut v: Vec<char> = {
        let s = read::<String>();
        s.chars().into_iter().collect()
    };
    for i in 0..nk[0] {
        if i == nk[1] - 1 {
            let c = v[i];
            v[i] = to_ascii_lowercase(c);
        }
    }
    let ret: String = v.into_iter().collect();
    println!("{}", ret);
}

fn to_ascii_lowercase(c: char) -> char {
    ((c as u8) | (1 << 5)) as char
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().parse().ok().unwrap()
}
//  [rust]
fn main() {
    let nk = read_vec::<usize>();
    let mut v: Vec<char> = {
        let s = read::<String>();
        s.chars().into_iter().collect()
    };
    for i in 0..nk[0] {
        if i == nk[1] - 1 {
            let c = v[i];
            v[i] = ((c as u8) + 32) as char;
        }
    }
    let ret: String = v.into_iter().collect();
    println!("{}", ret);
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().parse().ok().unwrap()
}
//  [rust]
use proconio::{
    input,
    marker::{Chars, Usize1},
};

fn main() {
    input! {
        n: usize,
        k: Usize1,
        mut s: Chars,
    }
    match s[k] {
        'A' => s[k] = 'a',
        'B' => s[k] = 'b',
        'C' => s[k] = 'c',
        _ => println!("Input Error"),
    }
    println!("{}", s.into_iter().collect::<String>());
}
//  [rust]
// -*- coding:utf-8-unix -*-

use proconio::input;

fn main() {
    input! {
        _: usize,
        k: usize,
        s: String,
    }
    let k = k - 1;
    let mut ans = String::default();
    for (i, c) in s.chars().enumerate() {
        if i==k {
            ans.push(c.to_lowercase().nth(0).unwrap());
        }
        else {
            ans.push(c);
        }
    }
    println!("{}", ans);
}
//  [rust]
use proconio::input;
use proconio::marker::{Chars, Usize1};

fn main()
{
    input! {
    _n:usize,
    k:Usize1,
    mut s:Chars,
    }

    let ans = s.into_iter().enumerate().map(|(i, c)| {
        if i == k {
            c.to_ascii_lowercase()
        } else {
            c
        }
    }).collect::<String>();
    println!("{}", ans);
}
//  [swift]
let input = readLine()!.split(separator: " ").map { Int($0)! }
let N = input[0]
let K = input[1]
var S = Array(readLine()!)

S[K - 1] = Character(UnicodeScalar(S[K - 1].unicodeScalars.first!.value + 32)!)

print(String(S))
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let nk = readInts()
    // let n = nk[0]
    let k = nk[1]
    var s = Array(readLine()!)
    
    if s[k - 1] == "A" {
        s[k - 1] = "a"
    } else if s[k - 1] == "B" {
        s[k - 1] = "b"
    } else {
        s[k - 1] = "c"
    }
    
    print(s.reduce("") { $0 + String($1) })
}

main()
//  [swift]
let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}
var arr2=readLine()!
 let characters = arr2.characters

var c = 1
var o  = "";
var p : String = "" 
for var s in characters {
  	
  	if( arr[1] == c ) { 
    	p = String(s).lowercaseString
    } else {
 		p = String(s)
	}
	
    o += p
	c += 1
}

print( o )
//  [swift]
import Foundation

let input_line1 = readLine()!
let input_line2 = readLine()!

let split = input_line1.componentsSeparatedByString(" ") //components(separatedBy:)と実質同じ
let length = Int(split[0])!
let changePosition = Int(split[1])!
var targetCharacter = Array(input_line2.characters)
let changedCharacter = String(targetCharacter[changePosition - 1]).lowercaseString
targetCharacter[changePosition - 1] = Array(changedCharacter.characters)[0]

print(String(targetCharacter))
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element? {
        return self.maxElement()
    }
    func min() -> Element? {
        return self.minElement()
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
//    func enumerated() -> [(Int, Element)] {
//        return self.enumerate()
//    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/

//func gcd(x: Int, _ y: Int) -> Int {
//    if y == 0 {
//        return x
//    } else {
//        return gcd(y, x%y)
//    }
//}
//func lcm(x: Int, _ y: Int) -> Int {
//    return x * y / gcd(x, y)
//}

/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (N, K) = (input[0], input[1])
var S = readLine()!.toArray()
for (i, c) in S.enumerate() {
    if i == K-1 {
        print(c.lowercased(), terminator: "")
    } else {
        print(c, terminator: "")
    }
}
print("")
//  [typescript]
((input: string): void => {
    const [[_, k], s]: any[] = (
        (h) => [h[0].split(" ").map(Number), h[1].trim()]
    )(input.split(/\n/))
    const hoge = s.split("").map(
        (v, i) => i+1==k ? v.toLowerCase() : v
    ).join("");
    console.log(hoge);
})(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
import * as fs from 'fs';

//in
// 3 1
//out
// ABC
const main = (inp: string) => {
    const [n, k]: number[] = inp.split('\n')[0].split(' ').map(Number);
    const s: string[] = inp.split('\n')[1].split('');
    for (let i: number = 0; i < n; i++) {
        if (i === k-1) {
            s[i] = s[i].toLowerCase();
        }
    }
    console.log(s.join(''));
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());
//  [typescript]
const input = require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);
const nin=()=>{const r = input[0];input.shift();return Number(r)};
const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};
const sin=()=>{const r = input[0];input.shift();return String(r)}
const out=(...a)=>{console.log(...a)}
const floor=(a)=>{return Math.floor(a)}
const min=(...a)=>{return Math.min(...a)}
const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}}
const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};
const main = ()=>{
  let [n, k] = [...nrin(2)];
  let s = sin();
  s = strrep(s, k-1, s[k-1].toLowerCase());
  out(s);
}
main();
//  [typescript]
import * as fs from "fs";

const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");

const [n, k]: number[] = input[0].split(' ').map((x: string): number => +x);
const s: string[] = input[1].split('');
let ans: string = '';
for(let i = 0; i < k-1; i++){
    ans += s[i];
}
ans += s[k-1].toLowerCase();
for(let i = k; i <n; i++){
    ans += s[i];
}

console.log(ans);
//  [typescript]
export class Main {
  static main(input): string {
    const tmp: string[] = input.split("\n");
    const [n, k]: number[] = tmp[0].split(" ").map(Number);
    let result: string = "";
    if (k > 1) {
      result += tmp[1].slice(0, k - 1);
    }
    result += tmp[1][k - 1].toLowerCase();
    if (k < n) {
      result += tmp[1].slice(k);
    }
    return `${result}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
function Main(input) {
    input = input.split("\n");
    const [n, k] = input[0].split(" ").map(s => Number(s));
    const str = input[1];
    console.log(str.slice(0, k - 1) + str[k - 1].toLowerCase() + str.slice(k, n));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]
import numpy as np
n = int(input())
l = list(map(int,input().split()))
lmax = np.argmax(l)
if l[lmax] < sum(l)-l[lmax]:
    print('Yes')
else:
    print('No')
//  [python]
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys  # {{{
import os
import time
import re
from pydoc import help
import string
import math
from operator import itemgetter
from collections import Counter
from collections import deque
from collections import defaultdict as dd
import fractions
from heapq import heappop, heappush, heapify
import array
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy as dcopy
import itertools
# }}}

# pre-defined{{{
sys.setrecursionlimit(10**7)
INF = 10**20
GOSA = 1.0 / 10**10
MOD = 10**9+7
ALPHABETS = [chr(i) for i in range(ord('a'), ord('z')+1)]  # can also use string module
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def DP(N, M, first): return [[first] * M for n in range(N)]
def DP3(N, M, L, first): return [[[first] * L for n in range(M)] for _ in range(N)]
from inspect import currentframe
def dump(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' => '+repr(arg) for arg in args), file=sys.stderr)
# }}}

def local_input():# {{{
    from pcm.utils import set_stdin
    import sys
    from pathlib import Path
    parentdir = Path(os.path.dirname(__file__)).parent
    inputfile = parentdir.joinpath('test/sample-1.in')
    if len(sys.argv) == 1:
        set_stdin(inputfile)
# }}}

def solve():
    N = int(input())
    L = list(map(int, input().split()))
    if max(L) < sum(L) - max(L):
        print("Yes")
    else:
        print("No")

    return 0

if __name__ == "__main__":# {{{
    try:
        local_input()
    except:
        pass
    solve()
# vim: set foldmethod=marker:}}}
//  [python]
n = raw_input()
ais = map(int, raw_input().split(' '))
print 'Yes' if sum(ais)>2*max(ais) else 'No'
//  [java]
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> l = IntStream.range(0, n)
                .mapToObj(i -> scanner.nextInt())
                .collect(Collectors.toList());
        int max = l.stream()
                .max(Comparator.comparingInt(Integer::intValue))
                .get();
        l.remove(Integer.valueOf(max));
        System.out.println(max < l.stream().mapToInt(Integer::valueOf).sum() ? "Yes" : "No");
    }
}
//  [java]

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner in = new Scanner(System.in);

	public static void main(String[] args) {
		int N = in.nextInt();
		int[] L = new int[N];
		for (int i = 0; i < N; i++) {
			L[i] = in.nextInt();
		}
		int max = Arrays.stream(L).max().getAsInt();
		int sum = Arrays.stream(L).sum();
		String ans = max < (sum - max) ? "Yes" : "No";
		System.out.println(ans);
	}
}