import sys
def Main():
t=int(sys.stdin.readline())
while t>0:
t-=1
input()
a=int(sys.stdin.readline())
f=int(sys.stdin.readline())
for i in range(f):
for j in range(1,a+1):
sys.stdout.write(str(j)*j+'\n')
for j in range(a-1,0,-1):
sys.stdout.write(str(j)*j+'\n')
if i <f-1 or t>0:
sys.stdout.write('\n')
if __name__=="__main__":
Main()
def Main():
t=int(sys.stdin.readline())
while t>0:
t-=1
input()
a=int(sys.stdin.readline())
f=int(sys.stdin.readline())
for i in range(f):
for j in range(1,a+1):
sys.stdout.write(str(j)*j+'\n')
for j in range(a-1,0,-1):
sys.stdout.write(str(j)*j+'\n')
if i <f-1 or t>0:
sys.stdout.write('\n')
if __name__=="__main__":
Main()
Comments
Post a Comment