Harryxun/stf_run huggingface dataset:
l = int(input())

for p in range(19, 0, -1):
    if 2**p < l:
        n = p+1
        break

p = n-1
m = 2*p
ans = []
for i in range(n-1):
    ans.append([i, i+1, 0])
    ans.append([i, i+1, 2**i])
    
while l > 2**p:
    for i in range(n-1, 0, -1):
        if l-2**(i-1) >= 2**p:
            ans.append([i, n, l-2**(i-1)])
            l = l-2**(i-1)
            m += 1
            break

print(n, m)
for a in ans:
    print(' '.join(list(map(str, a))))


### FIXED CODE ###

l = int(input())

p = 0
while True:
    if 2**p > l:
        p -= 1
        break
    else:
        p += 1
        
n = p+1
m = 2*p
ans = []
for i in range(1, n):
    ans.append([i, i+1, 0])
    ans.append([i, i+1, 2**(i-1)])
    
while l > 2**p:
    for i in range(n-1, 0, -1):
        if l-2**(i-1) >= 2**p:
            ans.append([i, n, l-2**(i-1)])
            l = l-2**(i-1)
            m += 1
            break

print(n, m)
for a in ans:
    print(' '.join(list(map(str, a))))
from math import factorial
n = int(input())
s = [input() for i in range(n)]

count = 0
list1 = []
for i in range(n):
    dic1 = {}
    for k in range(10):
        
        if s[i][k] not in dic1:
            dic1[s[i][k]] = s[i].count(s[i][k])
    list1.append(dic1)
list2 = []
for i in range(n):
    if list1[i] not in list2:
        j = list1.count(list1[i])
        if j >= 2:

            a = factorial(j) / factorial(2) / factorial(j - 2)
            count += a
        list2.append(list1[i])
print(int(count))

### FIXED CODE ###

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

count = 0
dic1 = {}
#print(s)
for i in range(n):
    #print(s[i])
    so = sorted(s[i])
    so = ''.join(so)
    if so in dic1:
        count += dic1[so]
        dic1[so] += 1
    else:
        dic1[so] = 1
    #print(count, dic1)
print(count)
=int(input())
A=list(map(int,input().split()))
x=1
flag=0
A.sort()
if 0 in A:
  print(0)
  exit()

for i in range(n):
  x*=A[n-i-1]
  if x>10**18:
    print(-1)
    flag=1
    exit()
  else:
    continue

if flag==0:
  print(x)

### FIXED CODE ###

n=int(input())
A=list(map(int,input().split()))
x=1
A.sort()
if 0 in A:
  print(0)
  exit()

for i in range(n):
  x*=A[n-i-1]
  if x>10**18:
    print(-1)
    exit()
  else:
    continue

print(x)
S_ = input()
T = input()
a = S_
b = T
def fit(pat, word):
    and([pi==wi for pi, wi in zip(pat, w) if s != '?'])
for i in reversed(range(len(a)-len(b)+1)):
    if fit(a[i:i+len(b)], b):
        ret = a[:i]+b+a[i+len(b):]
    
print(ret.replace('?', 'a')


### FIXED CODE ###

S_ = input()
T = input()
a = S_
b = T
def fit(pat, word):
    return all([pi==wi for pi, wi in zip(pat, word) if pi != '?'])

ret = False
for i in reversed(range(len(a)-len(b)+1)):
    if fit(a[i:i+len(b)], b):
        ret = a[:i]+b+a[i+len(b):]
        break    
    
if not ret:
    print('UNRESTORABLE')
elif not '?' in a:
    print(a)
else:
    print(ret.replace('?', 'a'))
x,n = map(int,input().split())

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

num1 = x

for i in range(n):
    num1 += 1
    print(num1 in p)
    if num1 not in p:
        dif1 = num1- x
        break

num2 = x
for k in range(n):
    num2 -= 1
    if num2 not in p:
        dif2 = x - num2
        break

if dif1 > dif2:
    print(num2)
elif dif1 < dif2:
    print(num1)
elif dif1 == dif2:
    print(num2)


### FIXED CODE ###

x,n = map(int,input().split())
if n == 0:
    print(x)
else:
    p = list(map(int,input().split()))
    
    if x not in p:
        print(x)
    else:

        num1 = x

        for i in range(n):
            num1 += 1
            if num1 not in p:
                dif1 = num1- x
                break

        num2 = x
        for k in range(n):
            num2 -= 1
            if num2 not in p:
                dif2 = x - num2
                break

        if dif1 > dif2:
            print(num2)
        elif dif1 < dif2:
            print(num1)
        elif dif1 == dif2:
            print(num2)
import sys

while 1:
  a , b = map(int,sys.stdin.readline().split())
  #if a == b == 0:
    break
  #elif a > b :
  #  print(b,a)
  #else :
#	print(a,b)

### FIXED CODE ###

import sys

while 1:
  a , b = sys.stdin.readline().split()
  if a == b == "0":
    break
  elif int(a) > int(b) :
    print(b,a)
  else :
    print(a,b)
a=int(input())
A=[]
B=[]
C=[0,1,2,6,24,120,720,5040,40320]
d=0
e=0
for p in range(a):
  s=int(input())
  A.append(s)
for q in range(a):
  b=int(input())
  B.append(b)
for i in range(a,1,-1):
  d1=C[i-1]*(A[a-i]-1)
  e1=C[i-1]*(B[a-i]-1)
  d=d+d1
  e=e+e1
print(abs(d-e))

### FIXED CODE ###

import itertools
a=int(input())
z=tuple(map(int,input().split()))
x=tuple(map(int,input().split()))
y=list(itertools.permutations(z))
y.sort()
ans1=y.index(z)+1
ans2=y.index(x)+1
print(abs(ans1-ans2))
def main():
	# n,m = map(int,input().split())
	# n,k = map(int,input().split())
	# n = int(input())
	# a = list(map(int,input().split()))
	# rsp = list(str(input()))
	# l = [list(map(int, input().split())) for _ in range(n)]
	# s = list(s)
	
	a,b,c = map(int,input().split())
 	ans = c-a+b
	if ans < 0:
		print(0)
	else:
		print(ans)

 
if __name__ == '__main__':
	main()

### FIXED CODE ###

def main():
	a,b,c = map(int,input().split())
	
	ans = c-a+b
	
	if ans < 0:
		print(0)
	else:
		print(ans)

 
if __name__ == '__main__':
	main()
n=int(input())
arr=list(map(int,input().split()))
vis={}
vis[1] = 0
if n < 2:
  print(0)
  exit
if n == 2:
  print(abs(arr[0]-arr[1]))
  exit
vis[2] = abs(arr[0]-arr[1])
def count(x):
    if x < 0:
      return 0
    if x in vis:
      return vis[x]
    else:
      vis[x]=min(abs(arr[x-1]-arr[x-2])+count(x-1),abs(arr[x-1]-arr[x-3])+count(x-2))
    return vis[x]
print(count(n))

### FIXED CODE ###

n=int(input())
arr=list(map(int,input().split()))
if n < 2:
  print(0)
vis = [0] * n
vis[0] = 0
vis[1] = abs(arr[0]-arr[1])
for i in range(2, n):
    step_1 = abs(arr[i]-arr[i-1]) + vis[i-1]
    step_2 = abs(arr[i]-arr[i-2]) + vis[i-2]
    vis[i] = min(step_1, step_2)
print(vis[-1])
import math
N, K = list(map(int, input().split()))

def combo(n, k):
    x = math.factorial(n)//(math.factorial(k)*math.factorial(n-k))
    return x

for i in range(1,K+1):
    if N-K+1 - i < 0 or K-1 < i-1:
        print(0)
    else:
        k = combo(N-K+1,i) * combo(K-1,i-1)
        ans = k%(math.pow(10,9)+7)
        print("%d" %(ans))


### FIXED CODE ###

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

def combo(n, k):
    x = math.factorial(n)//(math.factorial(k)*math.factorial(n-k))
    return x

for i in range(1,K+1):
    if N-K+1 < i or K-1 < i-1:
        print(0)
    else:
        k = combo(N-K+1,i) * combo(K-1,i-1)
        ans = k%(10**9+7)
        print("%d" %(ans))
n=int(input())
al=list(map(int,input().split())
if len(al)==len(set(al)):
    print('YES')
else:
    print('NO')

### FIXED CODE ###

n=int(input())
al=list(map(int,input().split()))
if len(al)==len(list(set(al))):
    print('YES')
else:
    print('NO')
s=input()
if s[0]=s[1] and s[1]=s[2]:
  print("Yes"
else:
  print("No"

### FIXED CODE ###

s = input()
if s[0]==s[1] and s[1]==s[2]:
  print("No")
else:
  print("Yes")
N,M,K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))


def Cum(X):
    temp = 0
    Cum = [0]*len(X)
    for i in range(len(X)):
        temp += X[i]
        Cum[i] += temp
    return Cum

a = Cum(A)
a.insert(0,0)
b = Cum(B)
b.insert(0,0)

na = 0
for i in range(N+1):
    if i == N and a[i]<=K:
        na = N
    elif a[i]<=K and a[i+1]>K:
        na = i

ans = na
temp = K-a[na]
nb = 0
for i in range(na,-1,-1):
    for j in range(nb,M+1):
        if j == M and b[i] <= temp:
            nb = M
        elif b[j]<=temp and b[j+1]>temp:
            nb = j
        ans = max(ans,i+nb)
print(ans)

### FIXED CODE ###

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


def Cum(X):
    temp = 0
    Cum = [0]*len(X)
    for i in range(len(X)):
        temp += X[i]
        Cum[i] += temp
    return Cum

a = Cum(A)
a.insert(0,0)
b = Cum(B)
b.insert(0,0)

na = 0
for i in range(N+1):
    if i == N and a[i]<=K:
        na = N
    elif a[i]<=K and a[i+1]>K:
        na = i

ans = na

nb = 0
for i in range(na,-1,-1):
    temp = K-a[i]
    for j in range(nb,M+1):
        if j == M and b[j] <= temp:
            nb = M
            ans = max(ans,i+nb)
        elif b[j]<=temp and b[j+1]>temp:
            nb = j
            ans = max(ans,i+nb)
            break
        
print(ans)
import itertools
digits1 = [str(i) for i in range(1,10)]
digits2 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits1]))
digits3 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits2]))
digits4 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits3]))
digits5 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits4]))
digits6 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits5]))
digits7 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits6]))
digits8 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits7]))
digits9 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits8]))
digits10 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits9]))
index = digits1 + digits2 + digits3 + digits4 + digits5 + digits6 + digits7 + digits8 + digits9 + digits10
K = int(input())
print(index[K-1])

### FIXED CODE ###

import itertools
def addLunLun(str_num):
    last_digit = int(str_num[len(str_num)-1:])
    if last_digit == 0:
        return [str_num+"0",str_num+"1"]
    elif last_digit == 9:
        return [str_num+"8",str_num+"9"]
    else:
        return [str_num + str(last_digit-1),str_num + str(last_digit),str_num + str(last_digit+1)]
    
digits1 = [str(i) for i in range(1,10)]
digits2 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits1]))
digits3 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits2]))
digits4 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits3]))
digits5 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits4]))
digits6 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits5]))
digits7 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits6]))
digits8 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits7]))
digits9 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits8]))
digits10 = list(itertools.chain.from_iterable([addLunLun(i) for i in digits9]))
index = digits1 + digits2 + digits3 + digits4 + digits5 + digits6 + digits7 + digits8 + digits9 + digits10
K = int(input())
print(index[K-1])
n, q = map(int,input().split())
cnt = [0] * (n+1)
import sys
sys.setrecursionlimit(10**6)
import numpy as np
tree = np.zeros((n+1, n+1))
part = [0] * (n+1)
for i in range(n-1):
    a, b = map(int,input().split())
    tree[a][b] = 1
def dfs(i):
    ret = [i]
    global part
    if tree[i] == [0] * n:
        part[i] = ret
        return ret
    for j in range(n+1):
        if tree[i][j] == 1:
            ret.extend(dfs(j))
    part[i] = ret
    return ret
dfs(1)
for _ in range(q):
    p,x = map(int,input().split())
    for node in part[p]:
        cnt[node] += x
print(*cnt[1:])

### FIXED CODE ###

n, q = map(int,input().split())
cnt = [0] * (n+1)
tree = [[] for _ in range(n+1)]
seen = [0] * (n+1)
todo = [1]
for i in range(n-1):
    a, b = map(int,input().split())
    tree[a].append(b)
    tree[b].append(a)
for _ in range(q):
    p,x = map(int,input().split())
    cnt[p] += x

while todo != []:
    i = todo.pop()
    seen[i] = 1
    for j in tree[i]:
        if seen[j] == 0:
            todo.append(j)
            cnt[j] += cnt[i]
print(*cnt[1:])
n,p=map(int,input().split())
s=input()
if p==2 or p==5:
    a=0
    for i in range(n):
        if int(s[i])%p==0:
            ans+=n
    print(a)
else:
    a=0
    g=[0]*(n+1)
    t=[0]*p
    t[0]=1
    for i in range(n-1,-1,-1):
        g[i]=(g[i+1]*10+int(s[n-i-1]))%p
        a+=t[g[i]]
        t[g[i]]+=1
    print(a)

### FIXED CODE ###

n,p=map(int,input().split())
s=input()
if p==2 or p==5:
    a=0
    for i in range(n):
        if int(s[i])%p==0:
            a+=i+1
    print(a)
else:
    a=0
    g=[0]*(n+1)
    t=[0]*p
    t[0]=1
    d=1
    for i in range(n-1,-1,-1):
        g[i]=(g[i+1]+int(s[i])*d)%p
        a+=t[g[i]]
        t[g[i]]+=1
        d*=10
        d%=p
    print(a)
N = int(intput())

print(round(N / 2) / N)

### FIXED CODE ###

N = int(input())

if N % 2 == 0:
  print(1 / 2)
else:
  print((N // 2 + 1) / N)
import numpy
numlist = list(map(float, input().split()))
a = numpy.array([numlist[0], numlist[1]])
b = numpy.array([numlist[2], numlist[3]])
u = b - a
print(numpy.linalg.norm(u))



### FIXED CODE ###

import math
x1,y1,x2,y2=map(float,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
print(math.sqrt(dx*dx+dy*dy))
w=str(input())
prnt("Sunny" if w=="Rainy" else "Cloudy" if w=="Sunny" else "Rainy")

### FIXED CODE ###

w=str(input())
print("Sunny" if w=="Rainy" else "Cloudy" if w=="Sunny" else "Rainy")
T=input()
T_len=len(T)
S=list(T)
if S[0]=="?":
    S[0]="D"

for i in range(T_len):
    if S[i]=="?":
        if S[i-1]=="D" and (S[i+1]=="D" or S[i+1]=="?"):
            S[i]="P"
        else:
            S[i]="D"
str_changed = "".join(S)
print(str_changed)

### FIXED CODE ###

T=input()
T_len=len(T)
S=list(T)
if S[0]=="?":
    S[0]="D"
if S[-1]=="?":
    S[-1]="D"

for i in range(T_len):
    if S[i]=="?":
        if S[i-1]=="D" and (S[i+1]=="D" or S[i+1]=="?"):
            S[i]="P"
        else:
            S[i]="D"
str_changed = "".join(S)
print(str_changed)
from math import gcd
N = int(input())
A = list(map(int,input().split()))

g = 0
for a in A:
    g = gcd(g,a)
if g > 1:
    print('not coprime')
    exit()

sa = set(A)
if len(sa) < N:
    print('setwise coprime')
    exit()

MAXN = 10**6+10
sieve = [0,0] + [1]*MAXN
p = 2
small_primes = []
while p*p <= MAXN:
    if sieve[p]:
        small_primes.append(p)
        for q in range(2*p,MAXN+1,p):
            sieve[q] = 0
    p += 1

st = set()
for a in A:
    for p in small_primes:
       found = False
        while a%p==0:
            a //= p
            found = True
        if found:
            if p in st:
                print('setwise coprime')
                exit()
            st.add(p)
        if a==1: break
    else:
        if a in st:
            print('setwise coprime')
            exit()
        st.add(a)

print('pairwise coprime')

### FIXED CODE ###

from math import gcd
N = int(input())
A = list(map(int,input().split()))

g = 0
for a in A:
    g = gcd(g,a)
if g > 1:
    print('not coprime')
    exit()

sa = set()
for a in A:
    if a==1: continue
    if a in sa:
        print('setwise coprime')
        exit()
    sa.add(a)

MAXN = 10**6+10
sieve = [0,0] + [1]*MAXN
p = 2
small_primes = []
while p*p <= MAXN:
    if sieve[p]:
        small_primes.append(p)
        for q in range(2*p,MAXN+1,p):
            sieve[q] = 0
    p += 1

st = set()
for a in A:
    for p in small_primes:
        found = False
        while a%p==0:
            a //= p
            found = True
        if found:
            if p in st:
                print('setwise coprime')
                exit()
            st.add(p)
        if a==1: break
    else:
        if a in st:
            print('setwise coprime')
            exit()
        st.add(a)

print('pairwise coprime')
A = int(input())
B = int(input())

count = 0

while B > 1 + (A-1)*(count):
    count = count + 1
print(count)

### FIXED CODE ###

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

ans = 0
outlet = 1

while b > outlet:
    ans = ans + 1
    outlet = outlet + (a-1)
print(ans)
import sys


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

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a,b=map(int,input().splpit())
print(a+int(b/2))

### FIXED CODE ###

import sys


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

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a,b=map(int,input().split())
print(a+int(b/2))
n,m = map(int,input().split())
A = list(map(int,input().split()))
 
for i in range(m):
  n -= A(i)
  
if n < 0:
  print(-1)
else:
  print(n)

### FIXED CODE ###

n,m = map(int,input().split())
A = list(map(int,input().split()))
 
for i in range(m):
  n -= A[i]
  
if n < 0:
  print(-1)
else:
  print(n)
r=input().split()
N=int(r[0])
M=int(r[1])
data=[[int(s) for s in input().split()] for i in range(M)]
left=[]
right=[]
for i in range(M):
    left.append(data[i][0])
    right.append(data[i][1])
if min(right)-max(left)+1=<0:
    print(0)
else:
    print(min(right)-max(left)+1)

### FIXED CODE ###

data=input().split()
N=int(data[0])
M=int(data[1])
data_gate=[input().split() for i in range(M)]
data_min=[]
data_max=[]
for i in range(M):
    data_min.append(int(data_gate[i][0]))
    data_max.append(int(data_gate[i][1]))
m=max(data_min)
M=min(data_max)
if M>=m:
    ans=M-m+1
else:
    ans=0
print(ans)
a,b=map(int,input().split())
s=input()
print("Yes" if s.count("-")==1 and s.index("-")==a else "No)

### FIXED CODE ###

a,b=map(int,input().split())
s=input()
print("Yes" if s.count("-")==1 and s.index("-")==a else "No")
#!/usr/bin/env python3
import sys

def main():
    
    n,m = map(int,input().split())
    a = list(map(int,input().split()))
    t=sum(a)
    a.sort()
    a.reverse()

    if a[m]>t/(4*m):
        print("Yes")
    else:
        print("No")

main()



### FIXED CODE ###

#!/usr/bin/env python3
import sys

def main():
    
    n,m = map(int,input().split())
    a = list(map(int,input().split()))
    t=sum(a)
    a.sort()
    a.reverse()
    
    if a[m-1]>=t/(4*m):
        print("Yes")
    else:
        print("No")

main()
n = int(input())
A = set()
for x in product('753_', repeat=9):
    s = ''.join(x)
    s = s.replace('_', '')
    if '7' in s and '5' in s and '3' in s and int(s) <= n:
        A.add(s)
print(len(A))

### FIXED CODE ###

from itertools import product
n = int(input())
A = set()
for x in product('753_', repeat=9):
    s = ''.join(x)
    s = s.replace('_', '')
    if '7' in s and '5' in s and '3' in s and int(s) <= n:
        A.add(s)
print(len(A))
data = {
    'S':[int(x) for x in range(1,14)],
    'H':[int(x) for x in range(1,14)],
    'C':[int(x) for x in range(1,14)],
    'D':[int(x) for x in range(1,14)]
     }

count = int(input())

n = int(input())
for nc in range(n):
    (s, r) = input().split()
    index = cards[s].index(int(r))
    del cards[s][index]
 
for s in ['S', 'H', 'C', 'D']:
    for r in cards[s]:
        print(s, r)

### FIXED CODE ###

cards = {
        'S': [0 for _ in range(13)],
        'H': [0 for _ in range(13)],
        'C': [0 for _ in range(13)],
        'D': [0 for _ in range(13)],
        }
  
n = int(input())
for _ in range(n):
    (s, r) = input().split()
    r = int(r)
    cards[s][r - 1] = r
  
for s in ('S', 'H', 'C', 'D'):
    for r in range(13):
        if cards[s][r] == 0:
            print( '{0:s} {1:d}'.format(s, r+1))
def main():
    d, g = map(int, input().split())
    pc = [list(map(int, input().split())) for _ in range(d)]

    n = len(pc)
    ans = float("inf")

    for i in range(2**n):
        point, cnt = 0, 0
        for j in range(n):
            if (i>>j) & 1:
                point += (j+1)*100*pc[j][0] + pc[j][1]
                cnt += pc[j][0]
        if point >= g:
            ans = min(ans, cnt)
        # print(cnt, point)
        else:
            for j in range(n+1, -1, -1):
                if (i >> j) & 1:
                    continue
                else:
                    for k in range(pc[j][0]):
                        if point >= g:
                            ans = min(ans, cnt)
                            break
                        point += (j+1)*100
                        cnt += 1
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    d, g = map(int, input().split())
    pc = [list(map(int, input().split())) for _ in range(d)]

    n = len(pc)
    ans = float("inf")

    for i in range(2**n):
        point, cnt = 0, 0
        for j in range(n):
            if (i>>j) & 1:
                point += (j+1)*100*pc[j][0] + pc[j][1]
                cnt += pc[j][0]
        if point >= g:
            ans = min(ans, cnt)
        # print(cnt, point)
        else:
            for j in range(n-1, -1, -1):
                if (i >> j) & 1:
                    continue
                else:
                    for k in range(pc[j][0]):
                        if point >= g:
                            ans = min(ans, cnt)
                            break
                        point += (j+1)*100
                        cnt += 1
    print(ans)


if __name__ == "__main__":
    main()
while True:
        H, W = map(int, input().split())

        if H == 0 | W == 0:
                break

        countW, countH = 0, 0

        while True:
                if countH == H:
                        break
                while True:
                        if countW == W:
                                print('\n',end='')
                                countW = 0
                                break
                        print('#',end='')
                        countW += 1
                countH += 1

         print()

### FIXED CODE ###

while True:
        H, W = map(int, input().split())

        if H == 0 | W == 0:
                break

        countW, countH = 0, 0

        while True:
                if countH == H:
                        break
                while True:
                        if countW == W:
                                print('\n',end='')
                                countW = 0
                                break
                        print('#',end='')
                        countW += 1
                countH += 1
        print()