Language: C++

using System;
using System.Collections.Generic;

namespace AtCoder_A
{
    class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve(new ConsoleInput(Console.In, ' '));
        }

        public void Solve(ConsoleInput cin)
        {
            var n = cin.ReadInt();
            var k = cin.ReadInt();
            var s = cin.Read();
            var ss = s.ToLower();

            string outstr = "";
            for(int i=0; i<n; i++)
            {
                if(k == i + 1)
                {
                    outstr += ss[i];
                }
                else
                {
                    outstr += s[i];
                }
            }

            Console.WriteLine(outstr);
        }
    }

    public class ConsoleInput
    {
        private readonly System.IO.TextReader _stream;
        private char _separator = ' ';
        private Queue<string> inputStream;
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
            inputStream = new Queue<string>();
        }
        public string Read()
        {
            if (inputStream.Count != 0) return inputStream.Dequeue();
            string[] tmp = _stream.ReadLine().Split(_separator);
            for (int i = 0; i < tmp.Length; ++i)
            {
                inputStream.Enqueue(tmp[i]);
            }
            return inputStream.Dequeue();
        }
        public string ReadLine() { return _stream.ReadLine(); }
        public int ReadInt() { return int.Parse(Read()); }
        public long ReadLong() { return long.Parse(Read()); }
        public double ReadDouble() { return double.Parse(Read()); }
        public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read(); return ret; }
        public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt(); return ret; }
        public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong(); return ret; }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:8:15: error: expected ':' before 'static'
    8 |         public static void Main(string[] args)
      |               ^~~~~~~
      |               :
a.cc:8:33: error: 'string' has not been declared
    8 |         public static void Main(string[] args)
      |                                 ^~~~~~
a.cc:8:42: error: expected ',' or '...' before 'args'
    8 |         public static void Main(string[] args)
      |                                          ^~~~
a.cc:13:15: error: expected ':' before 'void'
   13 |         public void Solve(ConsoleInput cin)
      |               ^~~~~
      |               :
a.cc:13:27: error: 'ConsoleInput' has not been declared
   13 |         public void Solve(ConsoleInput cin)
      |                           ^~~~~~~~~~~~
a.cc:35:6: error: expected ';' after class definition
   35 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void AtCoder_A::Program::Main(int*)':
a.cc:10:26: error: expected ';' before '.' token
   10 |             new Program().Solve(new ConsoleInput(Console.In, ' '));
      |                          ^
a.cc: In member function 'void AtCoder_A::Program::Solve(int)':
a.cc:15:13: error: 'var' was not declared in this scope
   15 |             var n = cin.ReadInt();
      |             ^~~
a.cc:16:17: error: expected ';' before 'k'
   16 |             var k = cin.ReadInt();
      |                 ^
a.cc:17:17: error: expected ';' before 's'
   17 |             var s = cin.Read();
      |                 ^
a.cc:18:17: error: expected ';' before 'ss'
   18 |             var ss = s.ToLower();
      |                 ^~
a.cc:20:13: error: 'string' was not declared in this scope
   20 |             string outstr = "";
      |             ^~~~~~
a.cc:21:28: error: 'n' was not declared in this scope
   21 |             for(int i=0; i<n; i++)
      |                            ^
a.cc:23:20: error: 'k' was not declared in this scope
   23 |                 if(k == i + 1)
      |                    ^
a.cc:25:21: error: 'outstr' was not declared in this scope
   25 |                     outstr += ss[i];
      |                     ^~~~~~
a.cc:25:31: error: 'ss' was not declared in this scope
   25 |                     outstr += ss[i];
      |                               ^~
a.cc:29:21: error: 'outstr' was not declared in this scope
   29 |                     outstr += s[i];
      |                     ^~~~~~
a.cc:29:31: error: 's' was not declared in this scope
   29 |                     outstr += s[i];
      |                               ^
a.cc:33:13: error: 'Console' was not declared in this scope
   33 |             Console.WriteLine(outstr);
      |             ^~~~~~~
a.cc:33:31: error: 'outstr' was not declared in this scope
   33 |             Console.WriteLine(outstr);
      |                               ^~~~~~
a.cc: At global scope:
a.cc:37:5: error: expected unqualified-id before 'public'
   37 |     public class ConsoleInput
      |     ^~~~~~