#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;
  scanf("%d", &t);
  while (t--) {
    int n, a, b, gt, lw;
    scanf("%d%d%d", &n, &a, &b);
    if (a > b) {
      gt = a;
      lw = b;
    } else {
      lw = a;
      gt = b;
    }
    int ans = lw * (n - 1);
    n--;
    int s = gt - lw;
    printf("%d ", ans);
    if (s > 0) {
      while (n--) {
        ans = ans + s;
        printf("%d ", ans);
      }
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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     1224 <main+0x104>
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
jle    118c <main+0x6c>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1198 <main+0x78>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%esi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x24(%rbp)
jle    1211 <main+0xf1>
jmp    11d9 <main+0xb9>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     120c <main+0xec>
mov    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d9 <main+0xb9>
jmp    1211 <main+0xf1>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x30,%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    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0xc(%rsp)
jae    1169 <main+0x39>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x10(%rsp),%r13
lea    0xe92(%rip),%rbx
jmp    1191 <main+0x61>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
subl   $0x1,0xc(%rsp)
jb     1158 <main+0x28>
lea    0xe68(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%ebp
cmp    %ebp,%eax
mov    %eax,%r15d
cmovg  %ebp,%r15d
cmovg  %eax,%ebp
mov    0x8(%rsp),%r12d
lea    -0x1(%r12),%eax
mov    %r15d,%esi
imul   %eax,%esi
mov    %eax,0x8(%rsp)
mov    %ebp,%r14d
sub    %r15d,%r14d
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
jle    1180 <main+0x50>
subl   $0x1,0x8(%rsp)
jb     1180 <main+0x50>
add    $0xfffffffe,%r12d
imul   %r12d,%r15d
add    %r15d,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    %r14d,%ebp
subl   $0x1,0x8(%rsp)
jae    1200 <main+0xd0>
jmp    1180 <main+0x50>

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