#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 mewtwo(long);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int t;
  long k;
  scanf("%d", &t);
  while (t--) {
    scanf("%ld", &k);
    printf("%lld\n", mewtwo(k) * 5 % 1000000007);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%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     119e <main+0x6e>
lea    0xe97(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <mewtwo@plt>
imul   $0x5,%eax,%eax
mov    $0x3b9aca07,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <main+0x21>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0x4(%rsp)
jb     11b8 <main+0x88>
lea    0xea9(%rip),%r14
lea    0x8(%rsp),%r15
lea    0xea1(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x8(%rsp),%rdi
call   1050 <mewtwo@plt>
lea    (%rax,%rax,4),%eax
movslq %eax,%rsi
imul   $0x44b82f99,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x3c,%rax
add    %ecx,%eax
imul   $0x3b9aca07,%eax,%eax
sub    %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
subl   $0x1,0x4(%rsp)
jae    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %5
5: ; preds = %9, %0
%6 = load i32, i32* %2
%7 = add nsw i32 %6, -1
store i32 %7, i32* %2
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %3)
%11 = load i64, i64* %3
%12 = call i32 @mewtwo(i64 %11)
%13 = mul nsw i32 %12, 5
%14 = srem i32 %13, 1000000007
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %14)
br label %5
16: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = bitcast i32* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 (i8*, ...) @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 %19, label %9
9: ; preds = %0, %9
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%11 = load i64, i64* %2
%12 = call i32 @mewtwo(i64 %11)
%13 = mul nsw i32 %12, 5
%14 = srem i32 %13, 1000000007
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %1
%17 = add nsw i32 %16, -1
store i32 %17, i32* %1
%18 = icmp eq i32 %16, 0
br i1 %18, label %19, label %9
19: ; preds = %9, %0
ret i32 0
}