Harryxun/stf_run huggingface dataset:
S = input()
T = input()
txt = S + T
print(txt)

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
S,T = read().decode('utf-8').split()
 
answer = T + S
print(answer)
n = int(input())
red =[]
for i in range(n):
  l = str(input())
  red.append(l)

m = int(input())
blue =[]
for i in range(m):
  l = str(input())
  blue.append(l)
  
import collections

cr = collections.Counter(red)
red_name = cr.most_common()[0][0]
red_count = cr.most_common()[0][1]
cb = collections.Counter(blue)
blue_name = cb.most_common()[0][0]
blue_count = cb.most_common()[0][1]

if blue_name == red_name:
  if red_count - blue_count < 0:
    if len(red)==1:
      print(0)
    else:
      if cr.most_common()[1][0]==cb.most_common()[1][0]:
        print(cr.most_common()[1][0]-cb.most_common()[1][0])
      else:
        print(cr.most_common()[1][1])
  else:
    print(red_count - blue_count)
else:
  print(red_count)

### FIXED CODE ###

n = int(input())
red =[]
for i in range(n):
  l = str(input())
  red.append(l)

m = int(input())
blue =[]
for i in range(m):
  l = str(input())
  blue.append(l)
  
import collections

cr = collections.Counter(red)
crs = list(cr.most_common())
cb = collections.Counter(blue)
cbs = list(cb.most_common())

result =[]

for i in range(len(cbs)):
  for j in range(len(crs)):
    if cbs[i][0]==crs[j][0]:
      result.append(crs[j][1]-cbs[i][1])
    else:
      flag = False
      count = 0
      for k in range(len(cbs)):
        if cbs[k].count(crs[j][0]) == 0:
          count+=1
      if count == len(cbs):
        result.append(crs[j][1])
        flag = False
        count = 0

if max(result)>0:
  print(max(result))
else:
  print(0)
import math
print(math.ceil(a+b)/2)

### FIXED CODE ###

print((sum(map(int,input().split()))+1)//2)
A,B,C,D =input()
E ="+-"

for i in E:
  for j in E:
    for k in E:
      s=A+i+B+j+C+k+D
      if eval(s)==7:
        print(s+"=7")
		exit()

### FIXED CODE ###

A,B,C,D =input()
E ="+-"

for i in E:
  for j in E:
    for k in E:
      s=A+i+B+j+C+k+D
      if eval(s)==7:
        print(s+"=7")
        exit()
# coding: utf-8
def insertSort(array):
    for i in array[1:]:
        [print(array[i]) for i in array]
        v = array[i]
        j = i - 1
        while j >= 0 and array[j] > v:
            array[j+1] = array[j]
            j -= 1
        array[j+1] = v
        
if __name__ == '__main__':
    n = input()
    index = [int for i in input().split()]
    insertSort(index)

### FIXED CODE ###

def insertSort(a, n):
    for i in range(1, n):
        v = a[i]
        j = i - 1
        while j >= 0 and a[j] > v:
            a[j+1] = a[j]
            j -= 1
        a[j+1] = v
        print(' '.join(map(str, a)))

if __name__ == '__main__':
    n = int(input())
    a = [int(i) for i in input().split()]
    print(' '.join(map(str, a)))
    insertSort(a, n)
3
28 27 24

### FIXED CODE ###

N = input()
A = map(int, input().split())
def main():
  for a in A:
    if a%2 == 0:
      if a%3 != 0 and a%5 != 0:
        print('DENIED')
        return
  print('APPROVED')
  return

main()
s=list(input())
ans=0
for i in range(len(s)):
  if ans==2:
    break
  if s[i]=='C':
    ans+=1
  if ans=1:
    if s[i]=='F':
      ans+=1
if ans==2:
  print('Yes')
else:
  print('No')
  

### FIXED CODE ###

s=list(input())
ans=0
for i in range(len(s)):
    if s[i]=='C':
        ans+=1
        break
for j in range(i,len(s)):
    if s[j]=='F':
        ans+=1
        break
if ans==2:
    print('Yes')
else:
    print('No')
import itertools
A, B, C, K = input().split()
import itertools

m=[1,0,-1]

c = list(itertools.combinations_with_replacement(m,int(K)));
sum=[]
for i in range(len(c)):
    if c[i].count(1)<=int(A) and c[i].count(0)<=int(B) and c[i].count(-1)<=int(C):
        sum.append(c[i].count(1)+c[i].count(-1))
print(max(sum))


### FIXED CODE ###

S=input()
T=input()

a=1
if len(T)==len(S)+1:
    for i in range(len(S)):
        if S[i]==T[i]:
            a=1
            if a==0:
                break
        
        else:
            a=0
            print('No')
            break
else:
    print('No')
if a==1:
    print('Yes')
s = input()

def get_sum(J, J3, I, L, L3, K):
    total1 = int(I * J3 + J * J3 / 3) % (10 ** 9 + 7)
    total2 = int(K * L3 + L * L3 / 3) % (10 ** 9 + 7)
    return total1 * total2

n_q = 0
n_c = 0
for i in range(len(s)):
    if s[i] == '?':
        n_q += 1
    elif s[i] == 'C':
        n_c += 1

n_q_right = [0]
n_a_right = [0]
n_c_right = [0]
for i in range(len(s) - 1):
    if s[i] == '?':
        n_q_right.append(n_q_right[-1] + 1)
        n_a_right.append(n_a_right[-1])
        n_c_right.append(n_c_right[-1])
    elif s[i] == 'A':
        n_q_right.append(n_q_right[-1])
        n_a_right.append(n_a_right[-1] + 1)
        n_c_right.append(n_c_right[-1])
    elif s[i] == 'C':
        n_q_right.append(n_q_right[-1])
        n_a_right.append(n_a_right[-1])
        n_c_right.append(n_c_right[-1] + 1)
    elif s[i] == 'B':
        n_q_right.append(n_q_right[-1])
        n_a_right.append(n_a_right[-1])
        n_c_right.append(n_c_right[-1])

total = 0
_n_q_right_3 = 1
_n_q_left_3 = 3 ** n_q
for i in range(len(s)):
    if s[i] == '?':
        _n_q_left_3 /= 3
        total += get_sum(n_q_right[i], _n_q_right_3, n_a_right[i], n_q - n_q_right[i] - 1, _n_q_left_3, n_c - n_c_right[i])
        _n_q_right_3 *= 3
    elif s[i] == 'B':
        total += get_sum(n_q_right[i], _n_q_right_3, n_a_right[i], n_q - n_q_right[i], _n_q_left_3, n_c - n_c_right[i])

print(total % (10 ** 9 + 7))


### FIXED CODE ###

s = input()
a, d = [0], [0]
for char in s[:-1]:
    if char == 'A':
        a.append(a[-1] + 1)
    else:
        a.append(a[-1])
    if char == '?':
        d.append(d[-1] + 1)
    else:
        d.append(d[-1])

c, e = [0], [0]
for char in s[::-1][:-1]:
    if char == 'C':
        c.append(c[-1] + 1)
    else:
        c.append(c[-1])
    if char == '?':
        e.append(e[-1] + 1)
    else:
        e.append(e[-1])
c = c[::-1]
e = e[::-1]

ret = 0
mod = 10 ** 9 + 7
for char, aa, dd, cc, ee in zip(s, a, d, c, e):
    if char in 'B?':
        tmp1 = aa * pow(3, dd, mod)
        if dd != 0:
            tmp1 += dd * pow(3, dd - 1, mod)

        tmp2 = cc * pow(3, ee, mod)
        if ee != 0:
            tmp2 += ee * pow(3, ee - 1, mod)

        ret += tmp1 * tmp2
        ret %= mod

print(ret)
print( "second" if all(a[i]%2==0 for i in range(N)) else "first" )

### FIXED CODE ###

n=int(input())
a=[int(input()) for i in range(n)]

print( "second" if all(a[i]%2==0 for i in range(n)) else "first" )
str1, str2 = [s for s in input().split()]
a = str1*str2
b = str2*str2
if a > b:
    print(a)
elif a < b:
    print(b)
else:
    print(a)

### FIXED CODE ###

str1, str2 = [s for s in input().split()]
if str1 == str2:
    print('Yes')
else:
    print('No')
# -*- coding: utf-8 -*-

import math

if __name__ == '__main__':
    N = int(input())
    A = []
    current_max = -1
    for i in range(N):
        A.append(int(input()))

    index = sorted(range(len(A)), key=lambda k: A[k])
    value = sorted(A)

    # print(A)

    for i in range(N):
        if index[i] < N-1:
            print(value[N-1])
        else:
            print(value[N-2])

### FIXED CODE ###

# -*- coding: utf-8 -*-



if __name__ == '__main__':
    r = int(input())
    area = 3 * r * r
    print(area)
N = int(input())
S = input()
c = 0
A = int(S.count("."))
B = N - A
if len(S) == N:
    if 1 <= N <= 2 * 10 ** 5:
        if "." in S:
            if "#" in S:
                S.replace(".#","ee")
                D = S.find("e")
                C = N - D + 1                
                print(N - C + B + 1)
            else:
                print(0)
        else:
            print(0)

### FIXED CODE ###

A,B,C = [int(i) for i in input().split()]
if 0 <= A and B and C <=100:
    if A < C < B:
        print("Yes")
    elif B < C < A:
        print("Yes")
    else:
        print("No")
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
max_list = a.index(max(a))
max_a = max(a)
if len(max_list) == 1:
  sec_max = sorted(a)[1]
else:
  sec_max = max_a

for i in range(n):
  if i in max_list:
    print(sec_max)
  else:
    print(max_a)

### FIXED CODE ###

n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
max_a = max(a)
if a.count(max(a)) == 1:
  sec_max = sorted(a)[-2]
else:
  sec_max = max_a

for i in range(n):
  if a[i] == max_a:
    print(sec_max)
  else:
    print(max_a)
n=int(input());d=[0]*20001;a=1;b=-1
for i in range(n):
    c=int(input())
    if b!=c:
        a+=d[c]
        d[c]=a
    b=c
print(a%(10**9+7))

### FIXED CODE ###

n=int(input());d=[0]*200001;a=1;b=0
for i in range(n):
    c=int(input())
    if b!=c:
        a+=d[c]
        d[c]=a
    b=c
print(a%(10**9+7))
from collections import defaultdict
import sys
input = sys.stdin.readline

N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()

new_dict = defaultdict(lambda: 0)
for i in range(M):
    b, c = [int(item) for item in input().split()]
    new_dict[c] += b
new_dict = sorted(new_dict.items(), key=lambda x: -x[0])


new_list = []
for k, v in new_dict:
    new_list += [k] * v
    # if len(new_list) >= N:
    #    break

"""
new_list = new_list[:N]

#####

n = min(N, len(new_list))
for i in range(n):
    if A[i] >= new_list[i]:
        break
    A[i] = new_list[i]

print(sum(A))
"""


### FIXED CODE ###

from collections import defaultdict
import sys
input = sys.stdin.readline

N, M = [int(item) for item in input().split()]
A = [int(item) for item in input().split()]
A.sort()

new_dict = defaultdict(lambda: 0)
for i in range(M):
    b, c = [int(item) for item in input().split()]
    new_dict[c] += b
new_dict = sorted(new_dict.items(), key=lambda x: -x[0])

new_list = []
for k, v in new_dict:
    if v > N:
        v = N
    new_list += [k] * v
    if len(new_list) >= N:
        break

new_list = new_list[:N]

#####

n = min(N, len(new_list))
for i in range(n):
    if A[i] >= new_list[i]:
        break
    A[i] = new_list[i]

print(sum(A))
n,m = map(int, input().split())
listA = [(map(int, input().split())) for i in range(m)]
for j in range(n):
  print(count(j+1))


### FIXED CODE ###

n,m = map(int, input().split())
listA = [list(map(int, input().split())) for i in range(m)]

for j in range(n):
  a = 0
  for k in range(m):
    a = a + listA[k].count(j+1)
  print(a)
import math
a,b,c,d=map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

cc=math.floor(b/c)-math.ceil(a/c)+1
dd=math.floor(b/d)-math.ceil(a/d)+1
cd=math.floor(b/(lcm(c, d)))-math.ceil(a/(lcm(c, d)))+1

print(b-a+1-(cc+dd-cd))

### FIXED CODE ###

import fractions
a,b,c,d=map(int,input().split())

def lcm(x, y):
    return (x*y)//fractions.gcd(x, y)

def div(a, b, x):
    if a%x!=0:
        return b//x-a//x
    else:
        return b//x-(a//x-1)

print(int(b-a+1-(div(a,b,c)+div(a,b,d)-div(a,b,lcm(c,d)))))
n=int(input())
s_o=input()
s_dot=[len(x) for x in s_o.replace("#"," ").split()]
s_sharp=[len(x) for x in s_o.replace("."," ").split()]
if s_o[0]==".":
  s_dot=s_dot[1:]
if s_o[-1]=="#":
  s_sharp[:-1]
if len(s_dot)==0 or len(s_sharp)==0:
  print(0)
  exit()
sum_sharp=[0]*len(s_sharp)
sum_dot=[0]*len(s_dot)
for i in range(len(sum_sharp)):
  if i==0:
    sum_sharp[i]=s_sharp[i]
  else:
    sum_sharp[i]=sum_sharp[i-1]+s_sharp[i]

for i in reversed(range(len(sum_dot))):
  if i==len(sum_dot)-1:
    sum_dot[i]=s_dot[i]
  else:
    sum_dot[i]=sum_dot[i+1]+s_dot[i]
ans=[1000000]*len(sum_sharp)
for i in range(len(sum_sharp)):
  ans[i]=sum_sharp[i]+sum_dot[-i-1]
print(min(ans))

### FIXED CODE ###

n=int(input())
s_o=input()
s_dot=[len(x) for x in s_o.replace("#"," ").split()]
s_sharp=[len(x) for x in s_o.replace("."," ").split()]
if s_o[0]==".":
  s_dot=s_dot[1:]
if s_o[-1]=="#":
  s_sharp=s_sharp[:-1]
length=len(s_dot)+1
if len(s_dot)==0 or len(s_sharp)==0:
  print(0)
  exit()
sum_sharp=[0]*length
sum_dot=[0]*length
for i in range(length):
  if i==0:
    sum_sharp[i]=0
  else:
    sum_sharp[i]=sum_sharp[i-1]+s_sharp[i-1]

for i in reversed(range(length)):
  if i==length-1:
    sum_dot[i]=0
  else:
    sum_dot[i]=sum_dot[i+1]+s_dot[i]
ans=[1000000]*(length)
for i in range(length):
  ans[i]=sum_sharp[i]+sum_dot[i]
print(min(ans))
a,b,c=map(int,input.split());print(["No","Yes"][bool(a==b+c)+bool(b==a+c)+bool(c==a+b)])


### FIXED CODE ###

a,b,c=map(int,input().split());print(["No","Yes"][(a+b==c)+(b+c==a)+(c+a==b)])
n, k = map(int, input().split())
a = list(map(lambda x: int(x) - 1, input().split()))

c = []
p = 0
na = 0
st = 0
ed = 0
while True:
    c.append(p)
    p = a[p]
    na += 1
    if p in c:
        st = p
        ed = len(c)
        break
if k < len(c):
    print(c[k] + 1)
else:
    k -= st
    k %= ed - st
    print(c[k] + 1)

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(lambda x: int(x) - 1, input().split()))

c = [None] * 200000
cc = set()
p = 0
st = 0
ed = 0
i = 0
while True:
    c[i] = p
    cc.add(p)
    i += 1
    p = a[p]
    if p in cc:
        st = c.index(p)
        ed = i
        break
if k < ed:
    print(c[k] + 1)
else:
    k -= st
    k %= ed - st
    print(c[st + k] + 1)
A, B = input().split()
N = max(len(A), len(B))
A, B = A.zfill(N), B.zfill(N)
if A == B:
  print("EQUAL")
if A > B:
  print("GREATER")
if A < B:
  print("LESS")


### FIXED CODE ###

A = int(input())
B = int(input())
if A == B:
  print("EQUAL")
if A > B:
  print("GREATER")
if A < B:
  print("LESS")
import math

a,b=map(int,input().split())

def factorization(n):
  arr=[]
  temp=n
  for i in range(2,int(math.sqrt(n))+1):
    if temp % i == 0:
      cnt = 0
      while temp % i == 0:
        cnt += 1
        temp //= i
      arr.append(i)
    if temp != 1:
      arr.append(temp)
    return arr
d=math.gcd(a,b)
print(len(factorization(d))+1)
    
               

### FIXED CODE ###

from fractions import gcd

a,b=map(int,input().split())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    return arr
  
d = gcd(a,b)
print(len(factorization(d)) + 1)
a,b,c=map(int,input())
s=set()
while True:
  x=a%b
  if x==c:
    print("YES")
    break
  elif x in s:
    print("NO")
    break
  else:
    s.add(x)

### FIXED CODE ###

a,b,c=map(int,input().split())
a_=a
s=set()
while True:
  x=a_%b
  if x==c:
    print("YES")
    break
  elif x in s:
    print("NO")
    break
  else:
    s.add(x)
  a_+=a
def witness(a, n, t, u):
    x = pow(a, u, n)  # x0 = a^u mod nを計算
    y = x

    for _ in range(0, t):
        y = (x * x) % n

        # 法nの下での1の非自明な平方根が存在するのはnが合成数であるときに限る
        if y == 1 and x != 1 and x != (n - 1):
            return True
        x = y
    return y != 1

def is_probably_prime(n, witnesses):
    t = 1
    u = n >> 1
    while u & 1 == 0:
        t = t + 1
        u >>= 1
    assert(2**t * u == n - 1)

    for a in witnesses:
        if a < n and witness(a, n, t, u):
            return False
    return True

def is_definitely_prime(n):
    '''
    if ((not (n & 1)) and n != 2) or (n < 2) or ((n % 3 == 0) and (n != 3)):
        return False
    elif n <= 3:
        return True
    else:
    '''
    return is_probably_prime(n, [2, 7, 61])

n = int(input())
answer = 0
for _ in range(0, n):
    m = int(input())
    if is_definitely_prime(m):
        answer = answer + 1
print(answer)


### FIXED CODE ###

def witness(a, n, t, u):
    x = pow(a, u, n)  # x0 = a^u mod nを計算

    for _ in range(0, t):
        y = (x * x) % n

        # 法nの下での1の非自明な平方根が存在するのはnが合成数であるときに限る
        if y == 1 and x != 1 and x != (n - 1):
            return True
        x = y
    return y != 1

def is_probably_prime(n, witnesses):
    t = 1
    u = n >> 1
    while u & 1 == 0:
        t = t + 1
        u >>= 1
    assert(2**t * u == n - 1)

    for a in witnesses:
        if a < n and witness(a, n, t, u):
            return False
    return True

def is_definitely_prime(n):
    if ((not (n & 1)) and n != 2) or (n < 2) or ((n % 3 == 0) and (n != 3)):
        return False
    elif n <= 3:
        return True
    else:
        return is_probably_prime(n, [2, 7, 61])


n = int(input())
answer = 0
for _ in range(0, n):
    m = int(input())
    if is_definitely_prime(m):
        answer = answer + 1
print(answer)
from math import gcd
from math import sqrt
A, B = map(int, input().split())
if (A == 1 or B == 1 or A == B):
    print(1)
    exit(0)

C = gcd(A, B)
ans = []
print(C)
for i in range(2, C + 1):
    if (C % i == 0): ans.append(i)
    if (i >= C // i): break
N = len(ans)
seen = [0] * N
cnt = 0
for i in range(N):
    if(seen[i]): continue
    for j in range(i, N):
        if (ans[j] % ans[i] == 0):
            seen[j] = 1
    cnt += 1
print(cnt + 1)


### FIXED CODE ###

from fractions import gcd
from math import sqrt


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


def main():
    A, B = map(int, input().split())
    C = gcd(A, B)
    if (C == 1):
        print(1)
        exit(0)
    arr = factorization(C)
    # print(arr)
    print(len(arr) + 1)


if __name__ == "__main__":
    main()
x = int(input())

y = int(input())

sum = x + y/2 

print(sum)

### FIXED CODE ###

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

print(int(x + y/2))
H,W =map(int,input().split())
h,m =map(int,input(),split())
print(H*W-h*W-w*H+h*W)


### FIXED CODE ###

H,W =map(int,input().split())
h,w =map(int,input().split())
print(H*W-h*W-w*H+h*w)
N=int(input())
ABC=[]
for i in range(N):
  l=list(map(int,input().split()))
  ABC=ABC+[l]
dp=[0,0,0]*N#dp[i][j]はi+1日目にアクティビティjを選んだ時の活動終了時の幸福量
for i in range(3):
  dp[0][i]=ABC[0][i]
for i in range(1,N):
  dp[i][1]=max(dp[i-1][2]+ABC[i][1],dp[i-1][0]+ABC[i][1])
  dp[i][0]=max(dp[i-1][1]+ABC[i][0],dp[i-1][2]+ABC[i][0])
  dp[i][2]=max(dp[i-1][1]+ABC[i][2],dp[i-1][0]+ABC[i][2])
ans=max(dp[N-1])
print(ans)

### FIXED CODE ###

N=int(input())
A=[]
B=[]
C=[]
for i in range(N):
  l1,l2,l3=map(int,input().split())
  A+=[l1]
  B+=[l2]
  C+=[l3]
dp=[[0,0,0] for i in range(N)]#dp[i][j]はi+1日目にアクティビティjを選んだ時の活動終了時の幸福量
dp[0][0]=A[0]
dp[0][1]=B[0]
dp[0][2]=C[0]
for i in range(1,N):
  dp[i][1]=max(dp[i-1][2]+B[i],dp[i-1][0]+B[i])
  dp[i][0]=max(dp[i-1][1]+A[i],dp[i-1][2]+A[i])
  dp[i][2]=max(dp[i-1][1]+C[i],dp[i-1][0]+C[i])
ans=max(dp[N-1])
print(ans)
import numpy as np

mod=998244353


n,m=map(int,input().split())
A=[list(map(float,input().split())) for i in range(n)]

A.sort(reverse=1)
A=np.array(A)

# if A[0][0]!=0

#print(A)
for i in range(min(n,m)):
    #print(A)
    A=list(A)
    A[i:].sort(reverse=1,key=lambda x:x[i])
    if A[i][i]==0 :
        A[i:].sort(key=lambda x:x[i])
    A=np.array(A)
    if A[i][i]!=0 :
        w=A[i][i]
        for k in range(m):
            
            A[i][k]/=w
        for j in range(i+1,n):
            A[j]-=A[i]*A[j][i]

#print(A)

r=0
j=0
for i in range(m):
    if A[j][i]!=0 :
        r+=1
        j+=1

for i in range(n):
    for i in range(m):
        A[i][j]=int(A[i][j])
#print(A)
print(r) #rank

a=1
b=1

for i in range(n+m-1):
    a=(a*2)%mod
for i in range(n+m-1-r):
    b=(b*2)%mod
#print((a-b)%mod)


### FIXED CODE ###

import numpy as np
import random

mod=998244353


n,m=map(int,input().split())
A=[list(map(int,input().split())) for i in range(n)]

#n,m=300,300
#A=[[int(random.randint(0,1)) for j in range(m)] for i in range(n)]


#A=np.array(A)

#print("A")
i=0
j=0
r=0 #rank
while i<n and j<m :
    #print(i)
    t=0
    if A[i][j]==0 :
        k=i
        while k<n and A[k][j]==0 :
            k+=1
        if k<n :
            A[i],A[k]=A[k],A[i]

            #print(A)
        else :
            t=1
            j+=1
    if t==0 :
        r+=1
        for p in range(i+1,n):
            if A[p][j]>0 :
                for kk in range(j,m):
                    A[p][kk]=(A[p][kk]-A[i][kk])%2
        i+=1
        j+=1



#r=0
#j=0
#for i in range(m):
#    if j<n :
#        if A[j][i]!=0 :
#            r+=1
#            j+=1

for i in range(n):
    for j in range(m):
        A[i][j]=int(A[i][j])
#print(A)
#print(r) #rank

a=1
b=1

for i in range(n+m-1):
    a=(a*2)%mod
for i in range(n+m-1-r):
    b=(b*2)%mod

print((a-b)%mod)
n, k =map(int, input().split())
s = input()

if k == 1:
  sTR = lower(s[0]) + s[1:]
else:
  sTR = s[:k-2] + lower(s[k-1]) + s[:k]

print(sTR)

### FIXED CODE ###

n, k =map(int, input().split())
STR = input()
str = STR.lower()

if k == 1:
  sTR = str[0] + STR[1:]
elif k == n:
  sTR = STR[:n-1] + str[n-1]
else:
  sTR = STR[:k-1] + str[k-1] + STR[k:]

print(sTR)
n = int(input())
a = list(map(int,input().split()))
t = [0] * 9
 
for i in range(n):
    t[a[i] // 400] += 1
 
z = t.pop(8)
p = t.count(0)
amax = min(8,8-p+z)
if p == 8:
    amin = 1
else:
    amin = 8 - p

print(amin,amax)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
t = [0] * 8
p = 0

for i in range(n):
    if a[i] < 3200:
        t[a[i] // 400] = 1
    else:
        p += 1

x = t.count(1)
amax = p+x
if x == 0:
    amin = 1
else:
    amin = x
print(amin,amax)
import numpy as np

n = int(input())
a = [int(input()) for _ in range(n)]
sort_a = list(np.sort(a))
sort_arg = np.argsort(a)
for i in range(n):
    tmp_l = sort_a[:]
    tmp_l.pop(sort_arg[i])
    print(tmp_l.pop(-1))

### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]
sort_a = sorted(a)
max_a = max(a)
max_ind = 0
for i in range(n):
    if a[i] == max_a: max_ind = i
for i in range(n):
    ans = max_a if i != max_ind else sort_a[-2]
    print(ans)
S=input()
li=[]
cnt=1
now=S[0]
for i in range(1,len(S)):
    if(S[i]==now):
        cnt+=1
        if(i==len(S)-1):
            li.append([now,cnt])
    else:
        li.append([now,cnt])
        now=S[i]
        cnt=1
        if(i==len(S)-1):
            li.append([now,cnt])
res=0
if(li[0][0]=='>'):
    res+=li[0][1]
if(li[-1][0]=='<'):
    res+=li[-1][1]
for i in range(len(li)-1):
    if(li[i][0]=='<' and li[i+1][0]=='>'):
        max_=max(li[i][1],li[i+1][1])
        min_=min(li[i][1],li[i+1][1])
        res+=((max_+1)*max_)//2
        res+=((min_)*(min_-1))//2
print(res)

### FIXED CODE ###

S=input()
n=len(S)
A=[0]*(n+1)
for i in range(n):
    if(S[i]=='<'):
        A[i+1]=A[i]+1
for i in reversed(range(n)):
    if(S[i]=='>'):
        A[i]=max(A[i],A[i+1]+1)
print(sum(A))
A,B,C,X = map(int, input().split())

cnt = 0
for i in range(A+1):
        for j in range(B+1):
                for k in range(C+1):
                        if (500*i + 100*j + 50*k) == X:
                            cnt += 1
                        else:
                            cnt += 0
print(cnt)

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
X = int(input())

cnt = 0
for i in range(0, A+1):
        for j in range(0, B+1):
                for k in range(0, C+1):
                        if int(500*i + 100*j + 50*k) == X:
                            cnt += 1
                     
print(cnt)
N = int(input())
S = str(input())
c = 0
for i in range(0,len(S)):
    if S[i] == 'A' and S[i+1]== 'B' and S[i+2] == 'C':
        c += 1
print(c)

### FIXED CODE ###

N = int(input())
S = str(input())
c = 0
for i in range(0,N):
    if S[i:i+3] == 'ABC':
        c += 1
print(c)