Datasets:

ArXiv:
License:
denisko's picture
cnanged dir structure and removed features file
3e77472
raw
history blame contribute delete
546 Bytes
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t= sc.nextInt();
while(t-->0){
Set<Integer> s =new HashSet<Integer>();
long n = sc.nextInt();
int k,l;
int j;
for(int i = 1; i <n; i++){
for(j = 1; j<n; j++){
if(i!=j){
System.out.println(i+" "+j);
}
}
System.out.println();
}
}
}
}