Harryxun/stf_run huggingface dataset:
n,k=map(int,input().split())


h=list(int(input()) for in range(n))
h.sort()
result=10**9

i=0
while i+k-1<n:
  result=min(result,h[i+k-1]-h[i])
  
  i+=1
  
print(result)
    

### FIXED CODE ###

n,k=map(int,input().split())
 
 
h=list(int(input()) for _ in range(n))
h.sort()
result=10**9
 
i=0
while i+k-1<n:
  result=min(result,h[i+k-1]-h[i])
  
  i+=1
  
print(result)
s = list(input())
answer = []

for i range s:
        if  i == "B":
            try:
                answer.pop()
            except IndexError:
                pass
        else:
            answer.append(i)

print(" ".join(answer))

### FIXED CODE ###

s = list(input())
answer = []

for i in s:
        if  i == "B":
            try:
                answer.pop()
            except IndexError:
                pass
        else:
            answer.append(i)

print("".join(answer))
# -*- coding: utf-8 -*-
import sys

n = int(input())
s = [int(c) for c in input()]

count = 0

for i in range(n-2):
    if s[i] < s[i+1] < s[i+2] or s[i] > s[i+1] > s[i+2]:
        count += 1

print(count)

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys

n = int(input())
s = [int(c) for c in input().split(' ')]

count = 0

for i in range(n-2):
    if s[i] < s[i+1] < s[i+2] or s[i] > s[i+1] > s[i+2]:
        count += 1

print(count)
line = raw_input()
a = line.split()
s = a[0] * a[1]
len = 2 * (a[0] + a[1])
print str(s) + " " + str(len)

### FIXED CODE ###

line = raw_input()
lis = line.split()
a = int(lis[0])
b = int(lis[1])
s = a * b
len = 2 * (a + b)
print str(s) + " " + str(len)
import bisect

def main():
    _ = int(input())
    nums = list(map(int, input().split()))
    n = len(nums)
    nums.sort()
    used = [False] * n
    
    cnt = 0
    #print(num_bin_digits)

    for cur in reversed(range(n)):
        continue
        if used[cur]:
            continue
        num = nums[cur]
        power_of_2 = 1 << len("{:b}".format(num))

        pair = power_of_2 - num

        idx = bisect.bisect_left(nums, pair)
        if idx >= cur or nums[idx] != pair:
            #print('continue',pair, idx)
            continue

        while used[idx]:
            idx += 1

        if nums[idx] == pair:
            used[idx] = True
            cnt += 1

        #print(idx, num, power_of_2, pair)
        #print(cnt, nums, used)

    print(cnt)

    return

main()

### FIXED CODE ###

def main():
    txt = input()

    w_cnt = 0
    cnt = 0
    for char in reversed(txt):
        if char == 'W':
            w_cnt += 1
        else:
            cnt += w_cnt
    print(cnt)
    return

main()
N = int(input())
x = [0] * N
u = [0] * N
for i in range(N):
    x[i],u[i] = map(int, input().split())
sum = 0
for i in range(N):
    if (u[i] == 'JPY'):
        sum += x[i]
    elif (u[i] == 'BTC'):
        sum += x[i] * 380000
    else:
        break


### FIXED CODE ###

N = int(input())
x = [0] * N
u = [0] * N
for i in range(N):
    x[i],u[i] = map(str, input().split())
    x[i] = float(x[i])

sum = 0

for i in range(N):
    if (u[i] == 'JPY'):
        sum += x[i]
    elif (u[i] == 'BTC'):
        sum += x[i] * 380000
    else:
        break
print(sum)
S = input()
if S == "hi" or S == "hihi" or S == "hihihi" or S = "hihihihi" or S == "hihihihihi":
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
if S == "hi" or S == "hihi" or S == "hihihi" or S == "hihihihi" or S == "hihihihihi":
  print("Yes")
else:
  print("No")
n=int(input())
k=int(input())
x=int(input())
y=int(input())
if n>k:
  print(x*k+y*(n-k)
else:
  print(x*n)

### FIXED CODE ###

n=int(input())
k=int(input())
x=int(input())
y=int(input())
if n>k:
  print(x*k+y*(n-k))
else:
  print(n*x)
#ABC137_C
N=int(input())
ans=[]
cnt=0
for _ in range(N):
    str_list=input()
    dic={}
    for i in range(10):
        if str_list[i] in dic:
            dic[str_list[i]]+=1
        else:
            dic[str_list[i]]=1
    ans.append(dic)
while len(ans)>1: 
    cnt+=temp=ans.count(ans.pop(0))
print(cnt) 

### FIXED CODE ###

#ABC137_C
from collections import Counter
N=int(input())
S=[input() for i in range(N)]

ctr=Counter()
ans=0

for s in S:
    a=''.join(sorted(list(s)))
    if a in ctr:
        ans+=ctr[a]
    ctr[a]+=1
print(ans)
"""C."""

import sys

input = sys.stdin.readline  # noqa: A001

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

result = 0

for i, v1 in enumerate(a):
    for j in range(i + 1, n + 1):
        result += v1 * a[j]
print(result)


### FIXED CODE ###

"""C."""

import sys

input = sys.stdin.readline  # noqa: A001

n = int(input())
a = list(map(int, input()[:-1].split(' ')))

MOD_VALUE = 10**9 + 7
result = 0

a_sum = sum(a)

for i, v in enumerate(a):
    result += v * (a_sum - v)
    a_sum -= v

if result < MOD_VALUE:
    print(result)
else:
    print(result % MOD_VALUE)
S = input()

if len(S) == 1:
  print(int(S))
else:
  ans = 0
  for i in range(1<<(len(S)-1)):
    SP = []
    for j in range(len(S)-1):
      if (i>>j)&1 == 1:
        SP.append(j)
    SP += [len(S)-1]
    #print(SP)
    idx = 0
    for sp in SP:
      ans += int(S[idx:sp+1])
      idx = sp+1
print(ans)


### FIXED CODE ###

S = input()

if len(S) == 1:
  print(int(S))
else:
  ans = 0
  for i in range(1<<(len(S)-1)):
    SP = []
    for j in range(len(S)-1):
      if (i>>j)&1 == 1:
        SP.append(j)
    SP += [len(S)-1]
    #print(SP)
    idx = 0
    for sp in SP:
      ans += int(S[idx:sp+1])
      idx = sp+1
  print(ans)
def B():
    mat = [list(map(int,input().split())) for i in range(3)]
    n = int(input())
    b = [list(map(int,input().split())) for i in range(n)]
    for bingo in b:
        for i in range(3):
            for j in range(3):
                if mat[i][j] == bingo:
                    mat[i][j] = 0
for i in range(3):
    if all(mat[i][j] == 0 for j in range(3)):
        print('Yes')
        break
    if all(mat[j][i] == 0 for j in range(3)):
        print('Yes')
        break
else:
    if mat[0][0] == mat[1][1] == mat[2][2] == 0 or\
            mat[0][2] == mat[1][1] == mat[2][0] == 0:
        print('Yes')
    else:
        print('No')
B()

### FIXED CODE ###

def B():
    mat = [list(map(int,input().split())) for i in range(3)]
    n = int(input())
    #b = [list(map(int,input().split())) for i in range(n)]
    for bingo in  (int(input()) for _ in range(n)):
        for i in range(3):
            for j in range(3):
                if mat[i][j] == bingo:
                    mat[i][j] = 0
    for i in range(3):
        if all(mat[i][j] == 0 for j in range(3)):
            print('Yes')
            break
        if all(mat[j][i] == 0 for j in range(3)):
            print('Yes')
            break
    else:
        if mat[0][0] == mat[1][1] == mat[2][2] == 0 or\
                mat[0][2] == mat[1][1] == mat[2][0] == 0:
            print('Yes')
        else:
            print('No')
B()
n=int(input())
a=list(map(int, input().split()))

if 0 in a:
    print(0)
else:
    m=1
    for i in a:
        m*=a[i]
        if m> 10**18:
            print(-1)
            break
        else:
            print(m)
        




### FIXED CODE ###

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

if 0 in a:
    print(0)
else:
    m=1
    for i in a:
        m*=i
        if 10**18 < m:
            print(-1)
            break
    else:
        print(m)
from itertools import accumulate
N = int(input())
A = list(map(int, input().split()))
S = sum(A)
B = list(accumulate([0] + A[1::2] + A[::2] + [A[1]]))
C = [S - 2 * (B[i+N//2] - B[i]) for i in range(N)]
print(*sum(list(map(list, zip(C[:N//2+1], C[N//2+1:]+[0]))), [])[:-1])

### FIXED CODE ###

from itertools import accumulate
N = int(input())
A = list(map(int, input().split()))
X1 = sum(A) - 2 * sum(A[1::2])


def g():
    state = X1
    yield X1
    for i in range(N-1):
        state = 2 * A[i] - state
        yield state


print(*list(g()))
a = int(input())
b = input()
i = 0
while i < a :
    print(end = b[i])
    i = i + 1
if a < len(b) :
    print(end = "...")

### FIXED CODE ###

a = int(input())
b = input()
i = 0
while i < a and i < len(b):
    print(end = b[i])
    i = i + 1
if a < len(b) :
    print(end = "...")
import sys
grid = []
painted = []

height, width, n = sys.stdin.readline().strip().split()
height, width, n = int(height), int(width), int(n)

def checkGrid(x, y, grid):
    count = 0
    for col in range(x, x+3):
        for row in range(y, y+3):
            if grid[row][col] == 1:
                count += 1
    return count

inp = sys.stdin.readline().strip()
while inp:
    a, b = inp.split()
    grid.append([int(a) - 1, int(b) - 1])
    inp = sys.stdin.readline().strip()

# Build empty grid
for i in range(height):
    painted.append([])
    for j in range(width):
        if [i, j] in grid:
            painted[i].append(1)
        else:
            painted[i].append(0)

# Build painted cells
for cell in grid:
    painted[cell[0]][cell[1]] = 1

for i in range(0, 10):
    count = 0
    for col in range(width - 2):
        for row in range(height - 2):
            if checkGrid(col, row, painted) == i:
                count += 1
    print(count)


### FIXED CODE ###

import sys
perm = sys.stdin.readline().strip()
total = 0

# Add n * '+' to inp
def addPlus(inp, n):
    total = 0
    possible = [inp]
    orig = inp

    for i in range(1, len(orig)):
        possible.append(orig[:i] + '+' + perm[i:])

    for i in range(1, n):
        curr = possible[:]
        for item in curr:
            for j in range(1, len(item)):
                processed = item[:j] + '+' + item[j:]
                if processed not in possible:
                    if '++' not in processed:
                        possible.append(processed)

    for item in possible:
        total += eval(item)

    return total


print(addPlus(perm, len(perm) - 1))
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for i in range(A+1):
  for j in ramge(B+1):
    for k in range(C+1):
      if 500*i + 100*j + 50*k == X:
        count+=1
print(count)

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 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:
        count+=1
print(count)
#include<bits/stdc++.h> 
using namespace std;
 
int main() {
	int n, m;
	cin >> n >> m;
	cout << (n*(n-1) / 2) + (m * (m-1) / 2) << "\n";
	return 0;
}


### FIXED CODE ###

import math
n,m=map(int,input().split())
def comb(k, r):
  if k<2:
    return 0
  else:
    return math.factorial(k) // (math.factorial(k - r) * math.factorial(r))

print(comb(n,2)+comb(m,2))
n=int(input())
d=[dict() for _ in range(n)]
for i in range(n):
    for c in input():
        if c not in d[i]:
            d[i][c]=1
        else:
            d[i][c]+=1
ans=""
for i in range(26):
    mini=10**18
    for j in range(n):
        if chr(97+i) not in d[j]:
            mini=0
        else:
            mini=min(mini,d[j][chr(97+i)])
    ans+=mini*chr(97+i)
print(ans)

### FIXED CODE ###

a,b,c=map(int,input().split())
if 2*b==a+c:
  print('YES')
else:
  print('NO')
N,K = map(int,input().split())
A = list(map(int,input().split()))

AA = A+A
last_i = {}
dp = [[0] for i in range(N)]
for i,a in enumerate(reversed(AA)):
    i = 2*N-i-1
    if i < N:
        dp[i][0] = last_i[a] - i + 1
    last_i[a] = i

MAX = N*K
k = 0
while (1<<k) <= MAX:
    for i in range(N):
        d,m = divmod(dp[i][k]+i, N)
        v = dp[m][k]
        dp[i].append(v + d*N+m-i)
    k += 1

def jump(k):
    j = x = 0
    while (1<<x) <= k:
        if k&(1<<x):
            j += dp[j%N][x]
            if j > MAX:
                return MAX+1
        x += 1
    return j

ok = 0
ng = MAX
while ng-ok > 1:
    m = (ok+ng)//2
    j = jump(m)
    if j <= MAX:
        ok = m
    else:
        ng = m

s = jump(ok)%N
if s==0:
    print()
else:
    ans = []
    anss = set()
    for a in A[s:]:
        if a in anss:
            anss.remove(a)
            while ans[-1] != a:
                ans.pop()
            ans.pop()
        else:
            anss.add(a)
            ans.append(a)
    print(*ans)

### FIXED CODE ###

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

if N==1:
    print(A[0] if K%2 else '')
    exit()

AA = A+A
last_i = {}
nx = [-1]*N
for i,a in enumerate(reversed(AA)):
    i = 2*N-i-1
    if i < N:
        nx[i] = (last_i[a] - i) % N + 1
    last_i[a] = i

visited = [-1]*N
visited[0] = 0
j = i = 0
while 1:
    p = nx[i]+N if nx[i]==1 else nx[i]
    j += p
    if visited[j%N] < 0:
        visited[j%N] = j
    else:
        break
    i = j%N
cycle = (j - visited[j%N]) // N
K %= cycle
j = i = 0
while 1:
    p = nx[i]+N if nx[i]==1 else nx[i]
    if j+p > N*K:
        break
    j += p
    i = j%N

if j%N == 0:
    if K==1:
        print(*A)
    else:
        print()
else:
    ans = []
    anss = set()
    for a in A[j%N:]:
        if a in anss:
            while ans[-1] != a:
                anss.remove(ans[-1])
                ans.pop()
            anss.remove(a)
            ans.pop()
        else:
            anss.add(a)
            ans.append(a)
    print(*ans)
n = int(input())
r = int(input())
if (n<10):
  print(100*(10-n)+r)
else:
   print(r)

### FIXED CODE ###

n,r = map(int,input().split())
if(n>=10):
  print(r)
else:
  print(100*(10-n)+r)
import sys
input=sys.stdin.readline
from collections import deque
from heapq import heappush,heappop
import re

def int_raw():
    return int(input())
 
def ss_raw():
    return input().split()
 
def ints_raw():
    return tuple(map(int, ss_raw()))


def main():
    N ,K = ints_raw()
    Vs = ints_raw()
    leftSum = [0]
    leftNegas = [[]]
    for v in Vs:
        leftSum.append(leftSum[-1]+v)
        neoNega = leftNegas[-1]
        if v<0:
            neoNega = neoNega+[v]
            neoNega.sort()
        leftNegas.append(neoNega )


    rightSum = [0]
    rightNegas = [[]]
    for v in Vs[::-1]:
        rightSum.append(rightSum[-1]+v)
        neoNega = rightNegas[-1]
        if v<0:
            neoNega = rightNegas[-1]+[v]
            neoNega.sort()
        rightNegas.append(neoNega )

    ans = 0
    for left_k in range(K+1):
        left_total = 0
        left_n = 0
        for n in range(left_k+1):
            tmp = leftSum[n] - (sum(leftNegas[n]) if len(leftNegas[n])+n<=left_k else sum(leftNegas[n][:left_k-n]))
            if left_total < tmp:
                left_total = tmp
                left_n = n
        right_total = 0
        right_n = 0
        for n in range(min(K-left_k+1,N-left_n+1)):
            tmp = rightSum[n] - (sum(rightNegas[n]) if len(rightNegas[n])+n<=K-left_k else sum(rightNegas[n][:K-left_k-n]))
            if right_total < tmp:
                right_total = tmp
                right_n = n
        ans = max(ans,left_total+right_total)
    return ans

print(main())


### FIXED CODE ###

import sys
input=sys.stdin.readline
from collections import deque
from heapq import heappush,heappop
import re

def int_raw():
    return int(input())
 
def ss_raw():
    return input().split()
 
def ints_raw():
    return tuple(map(int, ss_raw()))


def main():
    N ,K = ints_raw()
    Vs = ints_raw()
    N = len(Vs)
    leftSum = [0]
    leftNegas = [[]]
    for v in Vs:
        leftSum.append(leftSum[-1]+v)
        neoNega = leftNegas[-1]
        if v<0:
            neoNega = neoNega+[v]
            neoNega.sort()
        leftNegas.append(neoNega )


    rightSum = [0]
    rightNegas = [[]]
    for v in Vs[::-1]:
        rightSum.append(rightSum[-1]+v)
        neoNega = rightNegas[-1]
        if v<0:
            neoNega = rightNegas[-1]+[v]
            neoNega.sort()
        rightNegas.append(neoNega )

    ans = 0
    for left_k in range(K+1):
        left_total = 0
        left_n = 0
        for n in range(min(N+1,left_k+1)):
            tmp = leftSum[n] - (sum(leftNegas[n]) if len(leftNegas[n])<=left_k-n else sum(leftNegas[n][:left_k-n]))
            if left_total < tmp:
                left_total = tmp
                left_n = n
        right_total = 0
        right_n = 0
        right_k = K -left_k
        for n in range(min(K-left_k+1,N-left_n+1)):
            tmp = rightSum[n] - (sum(rightNegas[n]) if len(rightNegas[n])<=right_k-n else sum(rightNegas[n][:right_k-n]))
            if right_total < tmp:
                right_total = tmp
                right_n = n
        ans = max(ans,left_total+right_total)
    return ans

print(main())
a = list(input().count("A"))
if a = 3:
  print("No")
elif a = 0:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

a = input().count("A")
if a == 3:
  print("No")
elif a == 0:
  print("No")
else:
  print("Yes")
input(N)

def digitsum(a):
  x = 0
  while a > 0:
    x += a % 10
    a /= 10
  
  return x

if N % digitsum(N) == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N = int(input())

def digitsum(a):
  sum_ = 0
  while a > 0:
    sum_ += int(a)%10
    a /= 10
  return sum_

if N % digitsum(N) == 0:
  print('Yes')
else:
  print('No')
A,B,K=input().split()
A=int(A)
B=int(B)
K=int(K)
turn=0
while(1):
	if(turn==K):
		break
	if(turn%2==0):#高橋くん
		if(A%2==1):
			A-=1
	else:#青木くん
		if(B%2==1):
			B-=1
	turn+=1
print(A+" "+B)
 

### FIXED CODE ###


A,B,K=input().split()
A=int(A)
B=int(B)
K=int(K)
turn=0
while(1):
	if(turn==K):
		break
	if(turn%2==0):#高橋くん
		if(A%2==1):
			A-=1
		B+=A//2
		A-=A//2
	else:#青木くん
		if(B%2==1):
			B-=1
			
		A+=B//2
		B-=B//2
	turn+=1
print(str(A)+" "+str(B))
m = int(input())


if m%2 != 0
    print(m//2 + 1)
else:
    print(m//2)


### FIXED CODE ###

m = int(input())

if m%2 != 0:
    print(m//2 + 1)
else:
    print(m//2)
for i in range(len(t_list)):
    if i == 0:
        continue
    elif i == 1:
        ans_list.append(lcm(t_list[0] , t_list[1]))
    
    else:
        ans_list.append(lcm(ans_list[i-2],t_list[i]))
        
print(ans_list[-1])

### FIXED CODE ###

def fcd(a , b):
    
    if a>= b:
        while b != 0:
            a,b = b,a%b
        return a
    
    else:
        while a != 0:
            b,a = a,b%a
        return b
    
    
def lcm(a,b):
    return a*b//fcd(a , b)


n = int(input())
t_list = []
ans_list = []
for i in range(n):
    t_list.append(int(input()))
    
    
for i in range(len(t_list)):
    if i == 0:
        ans_list.append(t_list[0])
        continue
    if i == 1:
        ans_list.append(lcm(t_list[0] , t_list[1]))
    
    if i >=2:
        ans_list.append(lcm(ans_list[-1],t_list[i]))
print(ans_list[-1])
n,k=map(int,input().split())
List=list(map(int,input().split()))


li = []

for i in range(n):
    count=0
    for j in range(n):
        if List[i]>List[j]:
            count += 1
    li.append(count)
#print(str(sum(li))+"li")


count2=0

for i in range(1,n):
    for j in range(i+1,n+1):
        #print(i,j)
        if int(List[i-1]) > int(List[j-1]):
            count2 += 1
    #print(str(count2)+"count2")


for m in range(1,k):
    counted=count2+sum(li)*(m)
counted += count2



ans = counted % 1000000007
print(ans)

### FIXED CODE ###

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


li = []

for i in range(n):
    count=0
    for j in range(n):
        if List[i]>List[j]:
            count += 1
    li.append(count)

count2=0

for i in range(1,n):
    for j in range(i+1,n+1):
        if int(List[i-1]) > int(List[j-1]):
            count2 += 1

counted = k*count2 + (sum(li))*k*(k-1)//2

ans = counted % (10**9+7)
print(int(ans))
import math

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

y = b - (x / a**2)
z = (4 * y**2 + a**2)**0.5

cos = (a**2 - 4*y**2 - z**2) / (-4 * y * z)

theta = math.degrees(math.acos(cos))

print('{:.10f}'.format(90 - theta))

### FIXED CODE ###

import math

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

if x <= b * a**2 / 2:
    theta = math.degrees(math.atan2(b, 2*x/a/b))
else:
    theta = math.degrees(math.atan2(2*(a*b-x/a)/a, a))

print(theta)
N,A,B = map(int,input().split())
a = 0
for i in range(1,N+1):
    s = sum(map(int,str(i)))
    if A <= s <= B:
        a += n
print(a)

### FIXED CODE ###

N,A,B = map(int,input().split())
a = 0
for i in range(1,N+1):
    s = sum(map(int,str(i)))
    if A <= s <= B:
        a += i
print(a)
A, B, C = input()

D = A - B


if C - D <= 0:
  print(0)
else:
  print(C-D)

### FIXED CODE ###

A, B, C = (int(i) for i in input().split(" "))
 
D = A - B

 
if C - D <= 0:
  print(0)
else:
  print(C-D)
a, b, t = map(int, imput().split())
print(sum([b for _ in range(a, t+1, a)]))


### FIXED CODE ###

a, b, t = list(map(int, input().split()))
print(sum([b for _ in range(a, t+1, a)]))
N, K = map(int, input().split())
S = input()

arr = []
cnt = 0
comp = S[0]
for s in S:
    if s==comp:
        cnt += 1
    else:
        if comp=='0':
            arr.append(-cnt)
        else:
            arr.append(cnt)
        cnt = 1
        comp = s
if comp=='0':
    arr.append(-cnt)
else:
    arr.append(cnt)

def iter(A, cnt):
    if cnt>=K or len(A)<3:
        return max(A)
    m = -A[0]+A[1]
    args = [0]
    for i in range(len(A)-2):
        s3 = A[i] - A[i+1] + A[i+2]
        if m<s3:
            m = s3
            args = [i]
        elif m==s3:
            args.append(i)
    s3 = A[-2]-A[-1]
    if m<s3:
        m = s3
        args = [len(A)-1]
    elif m==s3:
        args.append(len(A)-1)
    cands = []
    for arg in args:
        if arg==0:
            B = [-A[0]+A[1]] + A[2:]
        elif arg==len(A)-1:
            B = A[:-2] + [A[-2]-A[-1]]
        else:
            B = A[:arg] + [A[arg] - A[arg+1] + A[arg+2]] + A[arg+3:]
        cands.append(iter(B, cnt+1))
    return max(cands)


print(iter(arr, 0))

### FIXED CODE ###

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

arr = []
cnt = 0
comp = S[0]
for s in S:
    if s==comp:
        cnt += 1
    else:
        arr.append(cnt)
        cnt = 1
        comp = s
arr.append(cnt)

if len(arr)<3:
    print(sum(arr))
else:
    if S[0]=='1':
        L = (len(arr)+1)//2 - K +1
        l = 0
        tmp = sum(arr[2*l:2*(l+K)+1])
        ans = tmp
        for l in range(1, L):
            tmp = tmp - (arr[2*(l-1)]+arr[2*l-1]) + sum(arr[2*(l-1+K)+1 : min(2*(l+K)+1, len(arr))])
            ans = max(tmp, ans)
    else:
        L = (len(arr)+1)//2 - K + 1
        l = 0
        tmp = sum(arr[2*l:2*(l+K)])
        ans = tmp
        for l in range(1, L):
            tmp = tmp - sum(arr[max(0,2*l-3) : 2*l-1]) + sum(arr[2*(l+K-1): min(2*(l+K), len(arr))])
            ans = max(tmp, ans)
            
    print(ans)
n=int(input())
t=[0]*3
x=[0]*3
y=[0]*3
for i in range(n):
    t[i+1],x[i+1],y[i+1] = map(int,input().split())

flag=True
for i in range(n):
    time=t[i+1]-t[i]
    dist=abs(x[i+1]-x[i])+abs(y[i+1]-y[i])
    if dist>time:
        flag=False
    if dist%2 != time%2:
        flag=False
if flag == True:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n=int(input())
t=[0]*(n+1)
x=[0]*(n+1)
y=[0]*(n+1)
for i in range(n):
    t[i+1],x[i+1],y[i+1] = map(int,input().split())

flag=True
for i in range(n):
    time=t[i+1]-t[i]
    dist=abs(x[i+1]-x[i])+abs(y[i+1]-y[i])
    if dist>time:
        flag=False
    if dist%2 != time%2:
        flag=False
if flag == True:
    print('Yes')
else:
    print('No')
while True:
    x=input().split()
    h=int(x[0])
    w=int(x[0])
    if a==0 and b==0:break
    for i in range (h):
        for j in range (w):
            print('#'*w)
    print(" ")


### FIXED CODE ###

while True:
    v=input().split()
    a=int(v[0])
    b=int(v[1])
    if a==0 and b==0:
       break
    for i in range (a):
        print('#'*b)
    print()