#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, a, b, i;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &n, &a, &b);
    if (a == b) {
      printf("%d\n", a);
      continue;
    }
    if (a > b) {
      i = b;
      b = a;
      a = i;
    }
    b -= a;
    a *= n - 1;
    for (i = 0; i < n; ++i)
      printf("%d ", a + i * b);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1215 <main+0xf5>
lea    0xea4(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1191 <main+0x71>
mov    -0x10(%rbp),%esi
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1141 <main+0x21>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    11af <main+0x8f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1202 <main+0xe2>
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%eax
imul   -0x14(%rbp),%eax
add    %eax,%esi
lea    0xe1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11ce <main+0xae>
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebf(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0x14(%rsp)
jb     1236 <main+0x106>
lea    0xe9d(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%rbx
lea    0xe92(%rip),%rbp
jmp    1199 <main+0x69>
nopl   0x0(%rax,%rax,1)
lea    0xe80(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
subl   $0x1,0x14(%rsp)
jb     1236 <main+0x106>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%eax
cmp    %eax,%esi
je     1180 <main+0x50>
mov    %eax,%ecx
cmovg  %esi,%ecx
cmovg  %eax,%esi
sub    %esi,%ecx
mov    %ecx,0x8(%rsp)
mov    0x10(%rsp),%ecx
lea    -0x1(%rcx),%eax
imul   %esi,%eax
mov    %eax,0xc(%rsp)
test   %ecx,%ecx
jle    1221 <main+0xf1>
mov    %rbp,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x2,0x10(%rsp)
jl     1221 <main+0xf1>
mov    $0x1,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%esi
imul   %r13d,%esi
add    0xc(%rsp),%esi
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r13d
cmp    0x10(%rsp),%r13d
jl     1200 <main+0xd0>
mov    $0xa,%edi
call   1030 <putchar@plt>
subl   $0x1,0x14(%rsp)
jae    1199 <main+0x69>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [4 x i8] c"%d \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %8
8: ; preds = %50, %17, %0
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
%11 = icmp ne i32 %9, 0
br i1 %11, label %12, label %52
12: ; preds = %8
%13 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i32, i32* %4
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %18)
br label %8
20: ; preds = %12
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i32, i32* %5
store i32 %25, i32* %6
%26 = load i32, i32* %4
store i32 %26, i32* %5
%27 = load i32, i32* %6
store i32 %27, i32* %4
br label %28
28: ; preds = %24, %20
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = sub nsw i32 %30, %29
store i32 %31, i32* %5
%32 = load i32, i32* %3
%33 = sub nsw i32 %32, 1
%34 = load i32, i32* %4
%35 = mul nsw i32 %34, %33
store i32 %35, i32* %4
store i32 0, i32* %6
br label %36
36: ; preds = %47, %28
%37 = load i32, i32* %6
%38 = load i32, i32* %3
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %50
40: ; preds = %36
%41 = load i32, i32* %4
%42 = load i32, i32* %6
%43 = load i32, i32* %5
%44 = mul nsw i32 %42, %43
%45 = add nsw i32 %41, %44
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %45)
br label %47
47: ; preds = %40
%48 = load i32, i32* %6
%49 = add nsw i32 %48, 1
store i32 %49, i32* %6
br label %36
50: ; preds = %36
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %8
52: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d%d%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, -1
store i32 %11, i32* %1
%12 = icmp eq i32 %10, 0
br i1 %12, label %49, label %13
13: ; preds = %0, %20
%14 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %24
18: ; preds = %13
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %15)
br label %20
20: ; preds = %18, %47
%21 = load i32, i32* %1
%22 = add nsw i32 %21, -1
store i32 %22, i32* %1
%23 = icmp eq i32 %21, 0
br i1 %23, label %49, label %13
24: ; preds = %13
%25 = icmp sgt i32 %15, %16
%26 = select i1 %25, i32 %15, i32 %16
%27 = select i1 %25, i32 %16, i32 %15
%28 = sub nsw i32 %26, %27
store i32 %28, i32* %4
%29 = load i32, i32* %2
%30 = add nsw i32 %29, -1
%31 = mul nsw i32 %30, %27
store i32 %31, i32* %3
%32 = icmp sgt i32 %29, 0
br i1 %32, label %33, label %47
33: ; preds = %24
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %31)
%35 = load i32, i32* %2
%36 = icmp sgt i32 %35, 1
br i1 %36, label %37, label %47
37: ; preds = %33, %37
%38 = phi i32 [ %44, %37 ], [ 1, %33 ]
%39 = load i32, i32* %3
%40 = load i32, i32* %4
%41 = mul nsw i32 %40, %38
%42 = add nsw i32 %41, %39
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %42)
%44 = add nuw nsw i32 %38, 1
%45 = load i32, i32* %2
%46 = icmp slt i32 %44, %45
br i1 %46, label %37, label %47
47: ; preds = %37, %33, %24
%48 = call i32 @putchar(i32 10)
br label %20
49: ; preds = %20, %0
ret i32 0
}