#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int t, n, i;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    if (n == 0)
      printf("NOT POSSIBLE\n");
    else {
      for (i = n - 1; i >= 0; i--)
        printf("%d ", i);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     11ca <main+0xaa>
lea    0xea6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1180 <main+0x60>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     11b2 <main+0x92>
mov    -0x10(%rbp),%esi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1189 <main+0x69>
jmp    11b7 <main+0x97>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xeac(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
subl   $0x1,0x8(%rsp)
jae    1175 <main+0x35>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xe84(%rip),%r14
lea    0xc(%rsp),%r12
lea    0xe7f(%rip),%r15
lea    0xe74(%rip),%r13
jmp    11b9 <main+0x79>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
subl   $0x1,0x8(%rsp)
jb     1165 <main+0x25>
mov    %r14,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%ebx
test   %ebx,%ebx
je     11a0 <main+0x60>
jle    11a8 <main+0x68>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     11e0 <main+0xa0>
jmp    11a8 <main+0x68>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"NOT POSSIBLE\0A\00"
@.str.2 = [4 x i8] c"%d \00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %29, %0
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
store i32 %8, i32* %2
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %31
10: ; preds = %6
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %29
16: ; preds = %10
%17 = load i32, i32* %3
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %4
br label %19
19: ; preds = %25, %16
%20 = load i32, i32* %4
%21 = icmp sge i32 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %19
%23 = load i32, i32* %4
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %22
%26 = load i32, i32* %4
%27 = add nsw i32 %26, -1
store i32 %27, i32* %4
br label %19
28: ; preds = %19
br label %29
29: ; preds = %28, %14
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %6
31: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d \00"
@str = [13 x i8] c"NOT POSSIBLE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add nsw i32 %6, -1
store i32 %7, i32* %1
%8 = icmp eq i32 %6, 0
br i1 %8, label %27, label %9
9: ; preds = %0, %22
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %9
%14 = icmp sgt i32 %11, 0
br i1 %14, label %17, label %22
15: ; preds = %9
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %22
17: ; preds = %13, %17
%18 = phi i32 [ %19, %17 ], [ %11, %13 ]
%19 = add nsw i32 %18, -1
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %19)
%21 = icmp ugt i32 %18, 1
br i1 %21, label %17, label %22
22: ; preds = %17, %13, %15
%23 = call i32 @putchar(i32 10)
%24 = load i32, i32* %1
%25 = add nsw i32 %24, -1
store i32 %25, i32* %1
%26 = icmp eq i32 %24, 0
br i1 %26, label %27, label %9
27: ; preds = %22, %0
ret i32 0
}