Harryxun/stf_run huggingface dataset:
import collections

n = int(input())
v = list(map(int, input().split()))

even_odd_length = n / 2
replace_total = 0

list_odd = v[0::2]
list_even = v[1::2]

dict_c_odd = dict(collections.Counter(list_odd))
dict_c_even = dict(collections.Counter(list_even))

if len(set(v)) == 1:
    print(int(even_odd_length))
else:
    max_count_c_odd = max(dict_c_odd.values())
    max_count_c_even = max(dict_c_even.values())
    max_c_odd_keys = [k for k, v in dict_c_odd.items() if v == max_count_c_odd]
    max_c_even_keys = [k for k, v in dict_c_even.items() if v == max_count_c_even]
    
    if max_count_c_odd > max_count_c_even:
        if max_c_odd_keys[0] in dict_c_even:
            del dict_c_even[max_c_odd_keys[0]]
        max_count_c_even = max(dict_c_even.values())
    elif max_count_c_odd < max_count_c_even:
        if max_c_even_keys[0] in dict_c_odd:
            del dict_c_odd[max_c_even_keys[0]]
        max_count_c_odd = max(dict_c_odd.values())
    else:
        if len(max_c_odd_keys) > len(max_c_even_keys):
            if max_c_even_keys[0] in dict_c_odd:
                del dict_c_odd[max_c_even_keys[0]]
            max_count_c_odd = max(dict_c_odd.values())
        elif len(max_c_odd_keys) < len(max_c_even_keys):
            if max_c_odd_keys[0] in dict_c_even:
                del dict_c_even[max_c_odd_keys[0]]
            max_count_c_even = max(dict_c_even.values())
        else:
            if list((set(max_c_odd_keys) & set(max_c_even_keys)))[0] in dict_c_odd:
                del dict_c_odd[max_c_even_keys[0]]
            max_count_c_odd = max(dict_c_odd.values())
    replace_total += (n - max_count_c_odd - max_count_c_even)
    print(int(replace_total))

### FIXED CODE ###

import collections

n = int(input())
v = list(map(int, input().split()))
even_odd_length = n / 2
replace_total = 0

list_odd = v[0::2]
list_even = v[1::2]

dict_c_odd = dict(collections.Counter(list_odd))
dict_c_even = dict(collections.Counter(list_even))
dict_c_even_bk = dict_c_even.copy()
dict_c_odd_bk = dict_c_odd.copy()

replace_total_tmp = 0
replace_total_tmp2 = 0
max_count_c_odd = max(dict_c_odd.values())
max_count_c_even = max(dict_c_even.values())
max_count_c_even_bk = max_count_c_even
max_c_odd_keys = [k for k, v in dict_c_odd.items() if v == max_count_c_odd]
max_c_even_keys = [k for k, v in dict_c_even.items() if v == max_count_c_even]

if len(set(v)) == 1:
    print(int(even_odd_length))
else:    
    if max_c_odd_keys[0] in dict_c_even:
        del dict_c_even[max_c_odd_keys[0]]
    max_count_c_even = max(dict_c_even.values())
    replace_total_tmp = (n - max_count_c_odd - max_count_c_even)
    
    dict_c_even = dict_c_even_bk
    max_count_c_even = max_count_c_even_bk
    
    if max_c_even_keys[0] in dict_c_odd:
        del dict_c_odd[max_c_even_keys[0]]
    max_count_c_odd = max(dict_c_odd.values())
    replace_total_tmp2 = (n - max_count_c_odd - max_count_c_even)
    
    if replace_total_tmp >= replace_total_tmp2:
         replace_total = replace_total_tmp2
    else:
         replace_total = replace_total_tmp
    print(replace_total)
while True:
	a,b,c,d,e,f = map(float,raw_input().split())
	x = (e*c-b*f) / (e*a-b*d)
	y = (c*d-a*f) / (b*d-e*a)
	print '%.3f %.3f' % (x,y)

### FIXED CODE ###

while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split())
		x = (e*c-b*f) / (e*a-b*d)
		y = (c*d-a*f) / (b*d-e*a)
		if x == -0.0:
			x = 0
		if y == -0.0:
			y = 0
		print '%.3f %.3f' % (x,y)
	except EOFError:
		break
int = input()
st = str(int)
chars = list(st)
if chars[0] == 7:
  print("Yes")
elif chars[1] == 7:
  print("Yes")
elif chars[2] == 7:
  print("Yes")
else print("No")

### FIXED CODE ###

int = int(input())
st = str(int)
chars = list(st)
if chars[0] == "7":
  print("Yes")
elif chars[1] == "7":
  print("Yes")
elif chars[2] == "7":
  print("Yes")
else:
  print("No")
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


s = S()
n = len(s)
a = [0] * (n + 1)
for i in range(len(s)):
    if '<' == s[i]:
        a[i + 1] = a[i] + 1
for i in reversed(range(len(s))):
    if '>' == s[i]:
        a[i] = max(a[i], a[i + 1] + 1)
    print(a)
print(sum(a))


### FIXED CODE ###

import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


s = S()
n = len(s)
ans = 0
cnt = 0
before_cnt = 0
now = s[0]
for x in s:
    if now == x:  # 同じ不等号が連続しているとき
        cnt += 1
    else:  # 不等号が変わるとき
        ans += cnt * (cnt + 1) // 2
        if now == '>':  # > から < に変わるとき
            if before_cnt < cnt:
                ans -= before_cnt
            else:
                ans -= cnt

        before_cnt = cnt
        cnt = 1
        now = x

ans += cnt * (cnt + 1) // 2
if now == '>':
    if before_cnt < cnt:
        ans -= before_cnt
    else:
        ans -= cnt
print(ans)
N, K = map(int, input().split())
A = list(map(int, input().split()))
def kiriage(a, b): #切り上げ
    return (a + b - 1) // b

print(kiriage((N - 1, K - 1)))


### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
def kiriage(a, b): #切り上げ
    return (a + b - 1) // b

print(kiriage(N - 1, K - 1))
import math
n = int(input())
v = [int(i) for i in input().split()]
if n == 2:
    print(max(v))


def gcd(x, y):
    if y > x:
        x, y = y, x
    if y == 0:
        return x
    if x % y == 0:
        return y
    return gcd(y, x % y)


l = [0 for i in range(n)]
Y = [0 for i in range(n)]

for i in range(1, n):
    l[i] = gcd(l[i - 1], v[i - 1])
for i in range(n - 1)[::-1]:
    r[i] = gcd(r[i+1], v[i+1])
m = [gcd(l[i], r[i]) for i in range(n)]
print(max(m))


### FIXED CODE ###

n = int(input())
v = [int(i) for i in input().split()]


def gcd(x, y):
    if y > x:
        x, y = y, x
    if y == 0:
        return x
    if x % y == 0:
        return y
    return gcd(y, x % y)


l = [0 for i in range(n)]
r = [0 for i in range(n)]

for i in range(1, n):
    l[i] = gcd(l[i - 1], v[i - 1])
for i in range(n - 1)[::-1]:
    r[i] = gcd(r[i+1], v[i+1])
m = [gcd(l[i], r[i]) for i in range(n)]
print(max(m))
N = int(input())
N = N%10
if N in [2,4,5,7,9]:
  return'hon'
elif N in[0,1,6,8]:
  return 'pon'
elif N == 3:
  return 'bon'

### FIXED CODE ###

N = int(input())
N = N%10
if N in [2,4,5,7,9]:
  print('hon')
elif N in[0,1,6,8]:
  print('pon')
elif N == 3:
  print('bon')
A, B = A, B = map(int, input().split())
if 1 <= A <= 9 and 1 <= B <= 9:
  print(A*B)
else:
  print(-1)

### FIXED CODE ###

A, B = map(int, input().split())
if 1 <= A <= 9 and 1 <= B <= 9:
  print(A*B)
else:
  print('-1')
import heapq
import sys
sys.setrecursionlimit(100000000)
x, y, z, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

q = []
ans = []
flag = []
first = [A[0] + B[0] + C[0], [0, 0, 0]]
heapq.heappush(q, first)
flag.append(first[1])
for h in range(k):
    max_ans = heapq.heappop(q)
    ans.append(abs(max_ans[0]))
    i, j, k = max_ans[1]
    if i == len(A)-1:
        i = i-1
    if j == len(B)-1:
        j = j-1
    if k == len(C)-1:
        k = k-1

    lst1 =  [-A[i+1]-B[j]-C[k], [i+1, j, k]]
    if lst1[1] not in flag:
        heapq.heappush(q, lst1)
        flag.append(lst1[1])

    lst2 = [-A[i]-B[j+1]-C[k], [i, j+1, k]]
    if lst2[1] not in flag: 
        heapq.heappush(q, lst2)
        flag.append(lst2[1])

    lst3 = [-A[i]-B[j]-C[k+1], [i, j, k+1]]
    if lst3[1] not in flag:
        heapq.heappush(q, lst3)
        flag.append(lst3[1])
    print(ans[h])

### FIXED CODE ###

import heapq
x, y, z, w = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

q = []
ans = []
flag = []
first = [A[0] + B[0] + C[0], [0, 0, 0]]
heapq.heappush(q, first)
flag.append(first[1])
for h in range(w):
    max_ans = heapq.heappop(q)
    ans.append(abs(max_ans[0]))
    i, j, k = max_ans[1]

    if i == x-1:
        lst1 =  [-A[i]-B[j]-C[k], [i, j, k]]
    else:
        lst1 =  [-A[i+1]-B[j]-C[k], [i+1, j, k]]
    if lst1[1] not in flag:
        heapq.heappush(q, lst1)
        flag.append(lst1[1])

    if j == y-1:
        lst2 = [-A[i]-B[j]-C[k], [i, j, k]]
    else:
        lst2 = [-A[i]-B[j+1]-C[k], [i, j+1, k]]
    if lst2[1] not in flag: 
        heapq.heappush(q, lst2)
        flag.append(lst2[1])

    if k == z-1:
        lst3 = [-A[i]-B[j]-C[k], [i, j, k]]
    else:
        lst3 = [-A[i]-B[j]-C[k+1], [i, j, k+1]]
    if lst3[1] not in flag:
        heapq.heappush(q, lst3)
        flag.append(lst3[1])
    
    print(ans[h])
n, m = map(int, input().split())
p, y = [0] * m, [0] * m
sort_year = [0] * m
initial_index, count_city = [0] * n, [0] * n
tmp_counter = [0] * n 
for i in range(m):
    p[i], y[i] = map(int, input().split())
    count_city[p[i] - 1] += 1
for j in range(1, n):
  	initial_index[j] = initial_index[j] + count_city[j - 1]
for i in range(m):
    sort_year[initial_index[p[i] - 1] + tmp_counter[p[i] - 1]] = y[i]
    tmp_counter[p[i] - 1] += 1
for j in range(n):
    sort_year[initial_index[j] : initial_index[j] + count_city[j - 1]].sort()
for i in range(m):
    x = sort_year.index(y[i]) - initial_index[p[i] - 1] + 1
    print(str(p[i]).zfill(8) + str(x).zfill(8))


### FIXED CODE ###

import bisect
def index(alist, x):
    i = bisect.bisect_left(alist, x)
    if i != len(alist) and alist[i] == x:
        return i
    raise ValueError

n, m = map(int, input().split())
p, y = [0] * m, [0] * m
year_list = [[] for _ in range(n)]
for i in range(m):
    p[i], y[i] = map(int, input().split())
    year_list[p[i] - 1].append(y[i])
for j in range(n):
    year_list[j].sort()
for i in range(m):
    x = index(year_list[p[i] - 1], y[i]) + 1
    print(str(p[i]).zfill(6) + str(x).zfill(6))
N , L= map(int,input().split())
lst = list()
Str = ''
for i in range(L):
    lst.append(input())
for k  in range(N):
    for j in range(N-1):
        if lst[j]+lst[j+1] >= lst[j+1]+lst[j]:
            lst[j],lst[j+1] = lst[j+1] ,lst[j]

for i in lst:
    Str += i
print(Str)


### FIXED CODE ###

N,L=map(int, input().split())
S=[]
for i in range(N):
    S.append(input())
S.sort()
result=''
for j in range(N):
    result+=S[j]     
print(result)
sp = list(input())
t = list(input())
n = len(sp)
for i in range(len(t), n + 1):
    flag = True
    for j in range(len(t)):
        if sp[n - i + j] != t[j] and sp[n - i + j] != '?':
            flag = False
            break
    if flag:
        s = ''
        sp[n - i:n - i + len(t)] = t
        for j in range(n):
            if sp[j] == '?':
                s += 'a'
            else:
                s += ss[j]
        print(s)
        exit()
print('UNRESTORABLE')


### FIXED CODE ###

sp = list(input())
t = list(input())
n = len(sp)
s = []
for i in range(len(t), n + 1):
    flag = True
    for j in range(len(t)):
        if sp[n - i + j] != t[j] and sp[n - i + j] != '?':
            flag = False
            break
    if flag:
        s.append('')
        ss = sp
        ss[n - i:n - i + len(t)] = t
        for j in range(n):
            if ss[j] == '?':
                s[-1] += 'a'
            else:
                s[-1] += ss[j]
if s == []:
    print('UNRESTORABLE')
else:
    s.sort()
    print(s[0])
a=input()
b=input()
for i in range(len(a)):
    if a[i]==b[i]:
        pass
    else:
        print("No")
        sys.exit()
print('Yes')


### FIXED CODE ###

s=input()
t=input()
import sys
for i in range(len(s)):
    if s[i]==t[i]:
        pass
    else:
        print("No")
        sys.exit()
print('Yes')
s = input()
n = len(s)-1
ans = 0
for i in range(2**n):
    data = []
    for j in range(n):
        if((i >> j) & 1):
            data.append(1)
        else:
            data.append(0)
    num = s[0]
    x = []
    for i in range(n-1):
        if data[i] == 1:
            x.append(int(num))
            num = s[i+1]
        else:
            num += s[i+1]
    if data[-1] == 0:
        num += s[-1]
        x.append(int(num))
    else:
        x.append(int(num))
        x.append(int(s[-1]))
    ans += sum(x)
print(ans)


### FIXED CODE ###

s = input()
n = len(s)-1
if n == 0:
    print(s)
    exit()

ans = 0
for i in range(2**n):
    data = []
    for j in range(n):
        if((i >> j) & 1):
            data.append(1)
        else:
            data.append(0)
    # print(data)
    num = s[0]
    x = []
    for i in range(n-1):
        if data[i] == 1:
            x.append(int(num))
            num = s[i+1]
        else:
            num += s[i+1]
    if data[-1] == 0:
        num += s[-1]
        x.append(int(num))
    else:
        x.append(int(num))
        x.append(int(s[-1]))
    ans += sum(x)
    # print(x)
print(ans)
import math
n , a , b  = map(int, input().split())
if a >= n : exit(print(n))
ans = n/(a+b)
print(math.floor(ans*a))

### FIXED CODE ###

s = list(input())
if len(set(s)) == 1:
    print("No")
else:
    print("Yes")
x=input()
y=input()
z=input()

print(z,x,y)

### FIXED CODE ###

num=input().split()
print(num[2],num[0],num[1])
n=input()
A={}
for i in range(n):
     x,y=input().split()
     if x=='insert':
         A.add(y)
     else:
         if A in y:
            print('yes')
         else:
            print('no')


### FIXED CODE ###

n=int(input())
A=set()
for i in range(n):
     x,y=input().split()
     if x == 'insert':
         A.add(y)
     else:
         print('yes'*(y in A)or'no')
int(input()) = A
int(input()) = B
c =2*A-B
if c>=0:
  print(c)
else:
  print(0)

### FIXED CODE ###

a,b =(int(x) for x in input().split())
c=a-b*2
if c>=0:
  print(c)
else:
  print(0)
n=input()
k=set()
for i in range(n):
  o=input()
  k.append(o))
print(len(k))

### FIXED CODE ###

n=int(input())
k=[]
for i in range(n):
  o=input()
  k.append(o)
print(len(set(k)))
# -*- coding: utf-8 -*-
def inpl(): return list(map(int, input().split()))
from copy import deepcopy
from operator import add
from itertools import accumulate

N, K = inpl()
A = sorted(inpl())
S = list(accumulate(A, add))
A = A[::-1]
DP = [False for _ in range(K)]
DP[0] = 1
OK = [False for _ in range(N)]

for i, a in enumerate(A):
    DP0 = deepcopy(DP)
    if a >= K:
        OK[i] = True
        continue
    for j, d in enumerate(DP0[-S[::-1][i]:], max(0, K-S[::-1][i])):
        if d:
            if j + a >= K:
                OK[i] = True
                break
            else:
                DP[j+a] = True

if sum(OK) == 0:
    print(N)
else:
    print(OK[::-1].index(True))

### FIXED CODE ###

# -*- coding: utf-8 -*-
def inpl(): return list(map(int, input().split()))
from math import ceil

X = int(input())
print(ceil((2*X+1/4)**(1/2) - 1/2))
n = int(input())
S = set(int, input().split())
q = int(input())
T = set(int, input().split())

print(len(S&T))

### FIXED CODE ###

n = int(input())
S = set(input().split())
q = int(input())
T = set(input().split())

print(len(S&T))
n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()

if n>=2:
    for i in range(n):
        sum=sum(a[2*i+1])
    
else:
    print(a[1])


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()

a_li=a[1:2*n:2]
print(sum(a_li))
a, b = map(int, input().split())
print(a*b 2*a+2*b)

### FIXED CODE ###

a, b = map(int, input().split())
print(a*b, 2*a+2*b)
from queue import Queue

def bfs(point):
    global visit, s
    while point.qsize() > 0:
        hh, ww = point.get()
        h_w_list = [[hh + 1, ww], [hh - 1, ww], [hh, ww + 1], [hh, ww - 1]]
        min_num = inf
        for h_, w_ in h_w_list:
            if (h_ in range(h)) & (w_ in range(w)):
                min_num = min(min_num, visit_num[h_][w_])
                if s[h_][w_] == ".":
                    if visit[h_][w_] == inf:                    
                        point.put([h_, w_])
        if visit[hh][ww] == inf:
            visit[hh][ww] = min_num

    
inf = 10 ** 9    
h, w = map(int, input().split())
s = []
point_num = 0
for _ in range(h):
    k = input()
    point_num += k.count(".")
    s.append(list(k))
visit = [[inf for _ in range(w)] for _ in range(h)]
point = Queue()
point.put([0, 0])
visit[0][0] = 0
bfs(point)
ans = point_num - visit[-1][-1] - 1
if ans < 0:
    ans = -1
print(ans)

### FIXED CODE ###

from queue import Queue

def bfs(point):
    global visit, s
    while point.qsize() > 0:
        hh, ww = point.get()
        h_w_list = [[1, 0], [- 1, 0], [0, 1], [0, - 1]]
        for h_, w_ in h_w_list:
            h_ = h_ + hh
            w_ = w_ + ww
            if (h_ in range(h)) & (w_ in range(w)):
                if s[h_][w_] == ".":
                    if visit[h_][w_] == inf:                    
                        point.put([h_, w_])
                        visit[h_][w_] = visit[hh][ww] + 1
        
    
inf = 10 ** 9    
h, w = map(int, input().split())
s = []
point_num = 0
for _ in range(h):
    k = input()
    point_num += k.count(".")
    s.append(list(k))
visit = [[inf for _ in range(w)] for _ in range(h)]
point = Queue()
point.put([0, 0])
visit[0][0] = 0
bfs(point)
ans = point_num - visit[-1][-1] - 1
if ans < 0:
    ans = -1
print(ans)
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n = int(input())
a = list(map(int,input().split()))
max = 0
for i in range(n):
    li = a[:i] + a[i + 1:]
    tmp = gcd_list(li)
    if tmp > max:
        max = tmp
print(max)

### FIXED CODE ###

import fractions
from functools import reduce

n = int(input())
a = list(map(int,input().split()))

#累積GCD
left = [0] * (n + 1)
right = [0] * (n + 1)
for i in range(n):
    #left.append(math.gcd(left[i],a[i]))
    left[i + 1] = (fractions.gcd(left[i],a[i]))
    #right.insert(0,math.gcd(right[0],a[n - 1 - i]))
    right[n - i - 1] = (fractions.gcd(right[n - i],a[n - 1 - i]))
#print(left)
#print(right)

ans = 0
for i in range(n):
    ans = max(ans,fractions.gcd(left[i],right[i + 1]))
print(ans)
import numpy as np

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

s_array=np.array(s)

if np.sum(s_array)==7:
    Ans=['+'+str(i) for i in s]
    Ans[0]=str(s[0])
    print(''.join(Ans)+'=7')
    
else:
    for i in range(3):
        if np.sum(s_array)-2*s_array[i+1]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[i+1]='-'+str(s[i+1])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
        
        elif np.sum(s_array)-2*s_array[1]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break

### FIXED CODE ###

import numpy as np

nyuryoku=input()

s=[int(i) for i in nyuryoku]

s_array=np.array(s)

if np.sum(s_array)==7:
    Ans=['+'+str(i) for i in s]
    Ans[0]=str(s[0])
    print(''.join(Ans)+'=7')
    
else:
    for i in range(3):
        if np.sum(s_array)-2*s_array[i+1]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[i+1]='-'+str(s[i+1])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
        
        elif np.sum(s_array)-2*s_array[1]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
while True:
 h,w=map(int,input().split())
 if h==0:break
 for i in range(h):
  x,y='#','.' if i%0==0 else '.','#'
  print("".join(zip([x]*(w+1)//2,[y]*w//2)))
 print()

### FIXED CODE ###

while 1:
 h,w=map(int,input().split())
 if h==0:break
 for i in range(h):print(('#.'*w)[i%2:][:w])
 print()
n,m==map(int,input().split())
if n==m:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n,m=map(int,input().split())
if n==m:
    print("Yes")
else:
    print("No")
k = int(input())
s = str(input())
if k<len(s):
    s = s[:k:1] + "..."
else:
    pass

print(s)


### FIXED CODE ###

n = int(input())%10
if n in {2, 4, 5, 7, 9}:
    print("hon") 
elif(n == 3):
    print("bon") 
else:
    print("pon")
n,x0=map(int,input().split())
x=list(map(int,input().split()))

def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)

ans=gcd(abs(x[0]-x0),abs(x[1]-x0))
for i in range(n):
    ans=gcd(ans,abs(x[0]-x0))
print(ans)

### FIXED CODE ###

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

def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)
if n==1:
    ans=abs(x[0]-x0)
else:
    ans=gcd(abs(x[0]-x0),abs(x[1]-x0))
    for i in range(n):
        ans=gcd(ans,abs(x[i]-x0))
print(ans)
def isp(n):
    a = 1
    for i in range(2, (n + 1) // 2 + 2):
        if not n % i:
            a = 0
            break
    return a


num = input()
if num == 2:
    print(1)
elif num == 3:
    print(2)
else:
    s = 2
    for x in range(2, num + 1):
        if isp(x):
            s += 1
    print(s)

### FIXED CODE ###

import sys

f = [1, 0, 0, 0, 1, 0] * (1000000 // 6 + 1)
f = [0, 0, 1, 1] + f[3:-2]

i = 5
while i < 1000:
    if f[i] == 1:
        j = i * i
        while j <= 1000000:
            f[j] = 0
            j += i + i
    i += 2

for n in sys.stdin:
    i = int(n)
    print(sum(f[:i + 1]))
print((lambda x:"None" if not x else x[0])(sorted(set([chr(97+i) for i in range(26)]-list(input()))))))

### FIXED CODE ###

print((lambda x:"None" if not x else sorted(list(x))[0])(set([chr(i) for i in range(97,97+26)])-set(list(input()))))
d = list(map(int, d.split()))
if d[0] < d[1]:
  print(0)
else:
  print(10)

### FIXED CODE ###

d = list(map(int, input().split()))
if d[0] < d[1]:
  print(0)
else:
  print(10)
n,k=int(input())
s=input()
str.lower(s[k])
print(s)

### FIXED CODE ###

n, k = map(int,input().split())
s = list(input())

s[k-1] = s[k-1].lower()

print(''.join(s))