Initially, there is a magical stone of mass 2^{N} lying at the origin of the number line. For the next N seconds, the following event happens: 

Let us define the *decomposition* of a magical stone as follows: If there is a magical stone of mass M > 1 lying at coordinate X, then it decomposes into two magical stones, each of mass \frac{M}{2} lying at the coordinates X-1 and X+1 respectively. The original stone of mass M gets destroyed in the process. 
Each second, all the magical stones undergo *decomposition* simultaneously.

Note that there can be more than one stone at any coordinate X. 

Given a range [L, R], find out the number of stones present at each of the coordinates in the range [L, R]. As the number of stones can be very large, output them modulo (10^{9} + 7). 

------ Input Format ------ 

- The first line contains a single integer T - the number of test cases. Then the test cases follow.
- The first and only line of each test case contains three integers N, L and R, as described in the problem statement. 

------ Output Format ------ 

For each testcase, output in a single line a total of (R-L+1) space-separated integers. The i^{th} integer will denote the number of stones present at X = (L+i-1) coordinate.
As the number of stones can be very large, output them modulo (10^{9} + 7). 

------ Constraints ------ 

$1 ≤ T ≤ 100$
$1 ≤ N ≤ 10^{6}$
$-N ≤ L ≤ R ≤ N$
- Sum of $(R-L+1)$ over all the test cases doesn't exceed $10^{5}$. 

----- Sample Input 1 ------ 
3
2 -2 2
2 0 2
150000 48 48

----- Sample Output 1 ------ 
1 0 2 0 1
2 0 1
122830846

----- explanation 1 ------ 
Test case 1: Let us look at the number of stones for $x = -2$ to $x = 2$ as the time progresses:

$t = 0$: $\{0, 0, 1, 0, 0\}$

$t = 1$: $\{0, 1, 0, 1, 0\}$

$t = 2$: $\{1, 0, 2, 0, 1\}$

We have to output the number of stones at $x = -2$ to $x = 2$, which is $\{1, 0, 2, 0, 1\}$.

Test case 2: Similar to first test case, We have to output the number of stones at $x = 0$ to $x = 2$, which is $\{2, 0, 1\}$.

Difficulty: HARD

Solutions:
def mod_pow(a, b, m):
	if b == 0:
		return 1
	if b == 1:
		return a % m
	tmp = mod_pow(a, b // 2, m)
	tmp = tmp * tmp % m
	if b % 2 == 1:
		tmp = tmp * a % m
	return tmp

def ncr(n, a, m, fact):
	first = mod_pow(fact[a], m - 2, m)
	second = mod_pow(fact[n - a], m - 2, m)
	res = fact[n] * first * second % m
	return res
mod = 10 ** 9 + 7
fact = [1]
for i in range(1, 10 ** 6 + 1):
	fact.append(fact[-1] * i % mod)
t = int(input())
for _ in range(t):
	(n, l, r) = map(int, input().split())
	ans = []
	for x in range(l, r + 1):
		if (x + n) % 2 != 0 or (n - x) % 2 != 0:
			ans.append(0)
		else:
			a = (n + x) // 2
			b = (n - x) // 2
			ans.append(ncr(n, a, mod, fact))
	print(*ans)


import functools
from math import factorial

def mod_exp(b, e, mod):
	r = 1
	while e > 0:
		if e & 1 == 1:
			r = r * b % mod
		b = b * b % mod
		e >>= 1
	return r

def fact_exp(n, p):
	e = 0
	u = p
	t = n
	while u <= t:
		e += t // u
		u *= p
	return e

def get_base_digits(n, b):
	d = []
	while n > 0:
		d.append(n % b)
		n = n // b
	return d

def fermat_binom_advanced(n, k, p):
	num_degree = fact_exp(n, p) - fact_exp(n - k, p)
	den_degree = fact_exp(k, p)
	if num_degree > den_degree:
		return 0
	if k > n:
		return 0
	num = 1
	for i in range(n, n - k, -1):
		cur = i
		while cur % p == 0:
			cur //= p
		num = num * cur % p
	denom = 1
	for i in range(1, k + 1):
		cur = i
		while cur % p == 0:
			cur //= p
		denom = denom * cur % p
	return num * mod_exp(denom, p - 2, p) % p

def lucas_binom(n, k, p):
	np = get_base_digits(n, p)
	kp = get_base_digits(k, p)
	binom = 1
	for i in range(len(np) - 1, -1, -1):
		ni = np[i]
		ki = 0
		if i < len(kp):
			ki = kp[i]
		binom = binom * fermat_binom_advanced(ni, ki, p) % p
	return binom
MOD = 10 ** 9 + 7
fact = [1]
invFact = [0] * (10 ** 6 + 1)
invFact[0] = invFact[1] = 1
for i in range(1, 10 ** 6 + 1):
	temp2 = fact[i - 1] * i
	temp2 %= MOD
	fact.append(temp2)
for i in range(2, 10 ** 6 + 1):
	invFact[i] = (MOD - MOD // i) * invFact[MOD % i] % MOD
for i in range(1, 10 ** 6 + 1):
	invFact[i] = invFact[i - 1] * invFact[i] % MOD

def ncr(n, r):
	return fact[n] * invFact[r] % MOD * invFact[n - r] % MOD

def solve(N, L, R):
	ans = []
	for index in range(L, R + 1):
		v = 0
		if N % 2 == 0:
			if abs(index) % 2 == 0:
				k = N // 2 + index // 2
				v = ncr(N, k)
		elif abs(index) % 2 == 1:
			k = N // 2 + (index + 1) // 2
			v = ncr(N, k)
		ans.append(str(v))
	print(' '.join(ans))
for T in range(int(input())):
	(N, L, R) = list(map(int, input().split()))
	solve(N, L, R)


def readInt():
	return int(input())

def readInts():
	return [int(x) for x in input().split()]

def readString():
	return input().rstrip()

def readStrings():
	return input().split()
prime = 1000000007
factorials = [1]
for n in range(1, 1000001):
	factorials.append(factorials[-1] * n % prime)

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
	return (g, x - b // a * y, y)

def modinv(a, m):
	(g, x, y) = egcd(a, m)
	return x % m

def readCase():
	(n, l, r) = readInts()
	return (n, l, r)

def binomial(n, k):
	ans = factorials[n] * modinv(factorials[n - k], prime) * modinv(factorials[k], prime)
	return ans % prime

def solve(n, l, r):
	start = -n
	result = []
	if (l - start) % 2 != 0:
		result.append(0)
	k_start = (l - start + 1) // 2
	k_end = (r - start) // 2
	for k in range(k_start, k_end + 1):
		result.append(binomial(n, k))
		result.append(0)
	if (r - start) % 2 == 0:
		result.pop()
	print(' '.join((str(x) for x in result)))
cases = readInt()
for case in range(cases):
	solve(*readCase())


m = 1000000007

def modinv(a, m):
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)
for _ in range(int(input())):
	(n, l, r) = map(int, input().split())
	dp = [1] * (n + 1)
	for i in range(1, n // 2 + 1):
		dp[i] = dp[i - 1] * (n - i + 1) % m * modinv(i, m)
		dp[n - i] = dp[i]
	ax = []
	for i in range(l, r + 1):
		if i < 0 and n & 1 == i & 1:
			ax.append(dp[(n + i) // 2] % m)
		elif i >= 0 and n & 1 == i & 1:
			ax.append(dp[(n - i) // 2] % m)
		else:
			ax.append(0)
	print(*ax)


MOD = 10 ** 9 + 7
LIM = 10 ** 6 + 1
fact = [1] * LIM
for i in range(1, LIM):
	fact[i] = fact[i - 1] * i % MOD

def C(n, r):
	den = fact[r] * fact[n - r] % MOD
	den = pow(den, MOD - 2, MOD)
	ans = fact[n] * den % MOD
	return ans

def Good(N, I):
	return N % 2 == I % 2

def fixR(n, i):
	return n // 2 - abs(i) // 2

def solve(N, L, R):
	li = []
	for i in range(L, R + 1):
		if not Good(N, i):
			li.append(0)
			continue
		r = fixR(N, i)
		li.append(C(N, r))
	print(*li)
for case in range(int(input())):
	(N, L, R) = map(int, input().split())
	solve(N, L, R)


def modInverse(a, m):
	m0 = m
	y = 0
	x = 1
	if m == 1:
		return 0
	while a > 1:
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if x < 0:
		x = x + m0
	return x

def compute_row(n, mod):
	res = [1]
	for i in range(1, n + 1):
		x = res[-1] * ((n - i + 1) / i)
		x = round(x % mod)
		res.append(x)
	return res
mod = 10 ** 9 + 7
factorials = [1]
inv = []
inv.append(modInverse(factorials[-1], mod))
for i in range(10 ** 6):
	factorials.append(factorials[-1] * (i + 1) % mod)
	inv.append(modInverse(factorials[-1], mod))
for _ in range(int(input())):
	(n, l, r) = [int(x) for x in input().split()]
	top = [1]
	for i in range(n):
		top.append(top[-1] * (n - i) % mod)
	row = [1]
	for i in range(1, n + 1):
		row.append(top[i] * inv[i] % mod)
	ans = []
	for i in range(l, r + 1):
		if (n + i) % 2:
			ans.append('0')
		else:
			ans.append(str(row[(n + i) // 2]))
	print(' '.join(ans))


mod = 10 ** 9 + 7

def fun(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = fun(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a, m):
	(g, x, y) = fun(a, m)
	return x % m
for _ in range(int(input())):
	(n, left, right) = map(int, input().split())
	arr = []
	i = 0
	curr = 1
	r = 0
	while r <= n // 2:
		arr.append(curr)
		curr = curr * (n - r) % mod * modinv(r + 1, mod) % mod
		r += 1
		arr.append(0)
	if left >= 0:
		if n & 1:
			arr = arr[::-1]
		else:
			arr = arr[::-1][1:]
		print(*arr[left:right + 1])
	else:
		if n & 1:
			arr = arr + arr[::-1][1:]
		else:
			arr = arr + arr[::-1][3:]
		print(*arr[left + n:right + 1 + n])


try:
	from debug import debug, timer
except ImportError:
	pass
from sys import stdin
input = stdin.readline

def rii():
	return range(int(input().strip()))

def ii():
	return int(input().strip())

def mii():
	return map(int, input().strip().split(' '))

def lmii():
	return list(map(int, input().strip().split(' ')))

def si():
	return str(input().strip())

def getvals():
	while True:
		yield from input().split()

def tri(n):
	return n * (n + 1) // 2

def smallest_first(m, n):
	return (min(m, n), max(m, n))
modulus = 10 ** 9 + 7

def p_to_k(n, p):
	return -1 if n - p & 1 else (n + p) // 2

def mod_exp(b, e, mod):
	return pow(b, e, mod)

def fermat_binom(n, k, p):
	if k > n:
		return 0
	num = 1
	for i in range(n, n - k, -1):
		num = num * i % p
	denom = 1
	for i in range(1, k + 1):
		denom = denom * i % p
	return num * mod_exp(denom, p - 2, p) % p

def fermat_compute(n, p):
	facts = [0 for _ in range(n + 1)]
	invfacts = [0 for _ in range(n + 1)]
	facts[0] = 1
	invfacts[0] = 1
	for i in range(1, n + 1):
		facts[i] = facts[i - 1] * i % p
		invfacts[i] = mod_exp(facts[i], p - 2, p)
	return (facts, invfacts)

def binom_pre_computed(facts, invfacts, n, k, p):
	return facts[n] * (invfacts[k] * invfacts[n - k] % p) % p

def solve(*args):
	(n, l, r) = args
	ans = list()
	(facts, invfacts) = fermat_compute(n, modulus)
	for idx in range(l, r + 1):
		pp = p_to_k(n, idx)
		if pp == -1:
			ans.append(0)
		else:
			ans.append(binom_pre_computed(facts, invfacts, n, pp, modulus))
	return ' '.join([str(x) for x in ans])

def do_codechef():
	for t in rii():
		(n, l, r) = mii()
		print(solve(n, l, r))
do_codechef()
exit()


p = 1000000007

def fermat_compute(n):
	facts = [0] * n
	invfacts = [0] * n
	facts[0] = 1
	invfacts[0] = 1
	for i in range(1, n):
		facts[i] = facts[i - 1] * i % p
		invfacts[i] = pow(facts[i], p - 2, p)
	return (facts, invfacts)

def binom_pre_computed(facts, invfacts, n, k):
	return facts[n - 1] * (invfacts[k - 1] * invfacts[n - k] % p) % p

def isEven(n):
	if n % 2 == 0:
		return True
	return False
for _ in range(int(input())):
	(n, l, r) = map(int, input().split())
	size = r - l + 1
	ans = [0 for _ in range(size)]
	(facts, invfacts) = fermat_compute(n + 1)
	i = 0
	while l < r + 1:
		if isEven(l + n):
			a = (l + n) // 2
			ans[i] = binom_pre_computed(facts, invfacts, n + 1, a + 1)
		i += 1
		l += 1
	print(' '.join(map(str, ans)))


import sys
import math
input = sys.stdin.readline
MAXN = 10 ** 6
MOD = 10 ** 9 + 7
fact = [1]
for i in range(1, MAXN + 1):
	fact.append(fact[-1] * i % MOD)

def multinv(n, m):
	if m == 1:
		return 0
	(m0, y, x) = (m, 0, 1)
	while n > 1:
		(y, x) = (x - n // m * y, y)
		(m, n) = (n % m, m)
	return x + m0 if x < 0 else x

def choose(n, k, m):
	return fact[n] * multinv(fact[n - k] * fact[k] % m, m) % m

def fs(n, i):
	if n % 2 == 0 and abs(i) % 2 == 1:
		return 0
	if n % 2 == 1 and abs(i) % 2 == 0:
		return 0
	if n % 2 == 0:
		return choose(n, n // 2 + math.ceil(abs(i) / 2), MOD)
	if n % 2 == 1:
		return choose(n, n // 2 + math.ceil(abs(i) / 2), MOD)
T = int(input())
for j in range(T):
	(n, l, r) = map(int, input().split())
	res = [fs(n, abs(i)) for i in range(l, r + 1)]
	print(*res)


import sys
MYPC = False
if MYPC:
	sys.stdin = open('in.txt', 'r')
	sys.stdout = open('out.txt', 'w')
input = lambda : sys.stdin.readline().strip('\r\n')
mod = 1000000007

def gcd_tuple(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = gcd_tuple(b % a, a)
		return (g, x - b // a * y, y)

def inv_mod(a, m=mod):
	(g, x, y) = gcd_tuple(a, m)
	if g != 1:
		return -1
	return x % m

def solve():
	(n, l, r) = map(int, input().split())
	l += n
	r += n
	(coeff, R) = (1, 0)
	coeffs = [0] * (2 * n + 1)
	for i in range(0, 2 * n + 1, 2):
		coeffs[i] = coeff
		R += 1
		factor = (n - R + 1) * inv_mod(R)
		factor %= mod
		coeff *= factor
		coeff %= mod
	print(*[coeffs[i] for i in range(2 * n + 1) if l <= i <= r])

def main() -> None:
	for _ in range(int(input())):
		solve()
main()


import math
maxN = 10 ** 6 + 1
facNumInv = [None] * (maxN + 1)
NumInv = [None] * (maxN + 1)
fac = [None] * (maxN + 1)

def InvofNum(p):
	NumInv[0] = 1
	NumInv[1] = 1
	for i in range(2, maxN + 1, 1):
		NumInv[i] = NumInv[p % i] * (p - int(p / i)) % p

def InvofFac(p):
	facNumInv[0] = 1
	facNumInv[1] = 1
	for i in range(2, maxN + 1, 1):
		facNumInv[i] = NumInv[i] * facNumInv[i - 1] % p

def factorial(p):
	fac[0] = 1
	for i in range(1, maxN + 1):
		fac[i] = fac[i - 1] * i % p

def nCrmodp(n, r, p):
	ans = fac[n] * facNumInv[r] % p * facNumInv[n - r] % p
	return ans
p_ = 10 ** 9 + 7
InvofNum(p_)
InvofFac(p_)
factorial(p_)
T = int(input())
for i in range(T):
	(N, L, R) = map(int, input().split())
	A = list(range(N + L, N + R + 1))
	a = []
	for j in A:
		if j % 2 == 0 and j >= 0 and (j <= 2 * N):
			a.append(nCrmodp(N, int(j / 2), p_))
		else:
			a.append(0)
	print(*a, sep=' ')


mod = 1000000007

def modinv(a):
	(x, y) = (1, 0)
	m = mod
	while a > 1:
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if x < 0:
		x += mod
		x %= mod
	return x

def mulmod(a, b):
	return a * b % mod

def cal(ncr, n):
	for i in range(1, n // 2 + 1):
		ncr[i] = mulmod(ncr[i - 1], n - i + 1)
		ncr[i] = mulmod(ncr[i], modinv(i))
for _ in range(int(input())):
	(n, l, r) = map(int, input().split())
	ncr = [1 for i in range(n)]
	cal(ncr, n)
	res = list()
	temp = n // 2
	if n % 2 == 1:
		temp += 1
	for i in range(0, temp):
		res.append(ncr[i])
		res.append(0)
	for i in range(n // 2, -1, -1):
		res.append(ncr[i])
		res.append(0)
	if n == 1:
		print(*[1, 0, 1][l + 1:r + 2])
	else:
		print(*res[l + n:r + n + 1])