import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.Scanner;
class Main
{
public static void main(String args[]) throws IOException
{
Scanner cin = new Scanner(new BufferedInputStream(System.in));
int input,wave,times;
input = cin.nextInt();
while(input>0)
{
wave = cin.nextInt();
times = cin.nextInt();
while(times>0)
{
int a;
for(a=1;a<=wave;a++){
for(int b=1;b<=a;b++){
System.out.print(b);
}
System.out.println();
}
for(a=a-2;a>0;a--){
for(int b=a;b>0;b--){
System.out.print(b);
}
System.out.println();
}
times--;
if(times>0)
System.out.println();
}
input--;
if(input>0)
System.out.println();
}
}
}
沒有留言:
張貼留言