Read problems statements [Hindi] ,[Bengali] , [Mandarin chinese] , [Russian] and [Vietnamese] as well.

In the magical land of Byteland, there are three kinds of citizens:
a Bit - $2\;\mathrm{ms}$ after a Bit appears, it grows up and becomes a Nibble (i.e. it disappears and a Nibble appears)
a Nibble - $8\;\mathrm{ms}$ after a Nibble appears, it grows up and becomes a Byte
a Byte - $16\;\mathrm{ms}$ after a Byte appears, it grows up, splits into two Bits and disappears

Chef wants to know the answer to the following question: what would the population of Byteland be immediately before the time $N\;\mathrm{ms}$ if only 1 Bit appeared at time $0\;\mathrm{ms}$?

Help him and find the population (number of citizens) of each type.

------  Input ------
The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
The first and only line of each test case contains a single integer $N$. 

------  Output ------
For each test case, print a single line containing three space-separated integers — the number of Bits, Nibbles and Bytes.

------  Constraints  ------
$1 ≤ T ≤ 10^{4}$
$1 ≤ N ≤ 1,600$

------  Subtasks ------
Subtask #1 (25 points): $1 ≤ N ≤ 140$

Subtask #2 (75 points): original constraints

----- Sample Input 1 ------ 
2

2

3
----- Sample Output 1 ------ 
1 0 0

0 1 0
----- explanation 1 ------ 
Immediately before the time $2\;\mathrm{ms}$, there is only one Bit. At $2\;\mathrm{ms}$, this Bit grows up, so immediately before $3\;\mathrm{ms}$, there is only one Nibble in Byteland.

Source: codechef | Difficulty: EASY
Tags: Implementation


Solutions:
for _ in range(int(input())):
	b = 1
	t = int(input())
	t -= 1
	l = 0
	i = t // 26
	for __ in range(i):
		b = b * 2
	t = t % 26
	if t < 2:
		l = 0
	elif t < 10:
		l = 1
	else:
		l = 2
	for j in range(3):
		if j == l:
			print(b, end=' ')
		else:
			print(0, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	a = n // 26
	b = n % 26
	final = [0, 0, 0]
	if 0 < b <= 2:
		final = [2 ** a, 0, 0]
	elif 2 < b <= 10:
		final = [0, 2 ** a, 0]
	elif b == 0:
		final = [0, 0, 2 ** (a - 1)]
	else:
		final = [0, 0, 2 ** a]
	final = [str(i) for i in final]
	print(' '.join(final))


from math import ceil
grow_t = [2, 8, 16]
for _ in range(int(input())):
	n = int(input())
	c = ceil(n / sum(grow_t))
	pop = 2 ** (c - 1)
	left_t = n % sum(grow_t)
	if left_t == 0:
		left_t += sum(grow_t)
	if left_t < 3:
		print(f'{pop} 0 0')
	elif left_t < 11:
		print(f'0 {pop} 0')
	else:
		print(f'0 0 {pop}')


t = int(input())
for i in range(t):
	n = int(input()) - 1
	exp = n // 26
	bits = 2 ** exp
	elapse = n % 26
	if elapse < 2:
		print(bits, 0, 0)
	elif elapse < 10:
		print(0, bits, 0)
	else:
		print(0, 0, bits)


t = int(input())
for i in range(t):
	n = int(input())
	pop_bit = 0
	pop_nib = 0
	pop_byt = 0
	x = (n - 0.01) // 26
	y = (n - 0.01) % 26
	if y <= 2:
		pop_bit = 2 ** x
	elif y > 2 and y <= 10:
		pop_nib = 2 ** x
	else:
		pop_byt = 2 ** x
	print(int(pop_bit), int(pop_nib), int(pop_byt))


for _ in range(int(input())):
	n = int(input())
	b_p = 2 ** ((n - 1) // 26)
	n = n % 26
	if n > 0 and n < 3:
		print(b_p, 0, 0)
	elif n > 2 and n < 11:
		print(0, b_p, 0)
	else:
		print(0, 0, b_p)


t = int(input())
while t:
	t -= 1
	s = int(input())
	a = s
	l = [0, 0, 0]
	i = s // 26
	if a != 0 and a % 26 == 0:
		i = i - 1
	s = s % 26
	if s <= 26 and s > 10 or (s == 0 and a != 0):
		l[2] = 2 ** i
	elif s > 2 and s <= 10:
		l[1] = 2 ** i
	else:
		l[0] = 2 ** i
	for i in range(len(l) - 1):
		print(l[i], end=' ')
	print(l[len(l) - 1])


t = int(input())
for i in range(t):
	n = int(input())
	pop = 2 ** ((n - 1) // 26)
	n = n % 26
	if 0 < n <= 2:
		print(pop, 0, 0)
	elif 0 < n <= 10:
		print(0, pop, 0)
	else:
		print(0, 0, pop)


for _ in range(int(input())):
	n = int(input())
	c = 2 ** ((n - 1) // 26)
	r = n % 26
	bit = nib = byte = 0
	if r > 0 and r <= 2:
		bit = c
	elif r > 0 and r <= 10:
		nib = c
	else:
		byte = c
	print(bit, nib, byte)


for _ in range(int(input())):
	n = int(input())
	if n % 26 == 0:
		a = n // 26 - 1
	else:
		a = n // 26
	a = 2 ** a
	b = n % 26
	if b in range(1, 3):
		print(a, 0, 0)
	elif b in range(3, 11):
		print(0, a, 0)
	else:
		print(0, 0, a)


tests = int(input())
for i in range(tests):
	n = int(input())
	count = 2 ** ((n - 1) // 26)
	remaining = n % 26
	bits = nibbles = bytes_ = 0
	if remaining > 0 and remaining <= 2:
		bits = count
	elif remaining > 0 and remaining <= 10:
		nibbles = count
	else:
		bytes_ = count
	print(bits, nibbles, bytes_)


tests = int(input())
for i in range(tests):
	n = int(input())
	count = 1
	transformations = 0
	while n > 0:
		if n > 2:
			n -= 2
			transformations += 1
		else:
			break
		if n > 8:
			n -= 8
			transformations += 1
		else:
			break
		if n > 16:
			n -= 16
			transformations += 1
			count *= 2
		else:
			break
	(bits, nibbles, bytes_) = (0, 0, 0)
	if transformations > 0:
		mod = transformations % 3
		if mod == 0:
			bits = count
		elif mod == 1:
			nibbles = count
		else:
			bytes_ = count
	else:
		bits = 1
	print(bits, nibbles, bytes_)


for i in range(int(input())):
	n = int(input())
	bit = 2 ** ((n - 1) // 26)
	x = n - 26 * (n // 26)
	if 0 < x <= 2:
		print(bit, 0, 0)
	elif 2 < x and x <= 10:
		print(0, bit, 0)
	else:
		print(0, 0, bit)


T = int(input())
for i in range(T):
	n = int(input())
	n -= 1
	y = n % 26
	x = n // 26
	bits = 2 ** x
	if y < 2:
		print(bits, 0, 0)
	elif y < 10:
		print(0, bits, 0)
	else:
		print(0, 0, bits)


t = int(input())
for i in range(t):
	n = int(input()) - 1
	bits = 1
	num = n // 26
	nearesPos = num * 26
	gap = n - nearesPos
	bits = pow(2, num)
	if gap >= 0 and gap < 2:
		print(f'{bits} 0 0')
	elif gap >= 2 and gap < 10:
		print(f'0 {bits} 0')
	else:
		print(f'0 0 {bits}')


t = int(input())
for _ in range(t):
	n = int(input())
	bits = 0
	nibbles = 0
	nbytes = 0
	if n % 26 == 1 or n % 26 == 2:
		bits += pow(2, n // 26)
	if n % 26 >= 3 and n % 26 <= 10:
		nibbles += pow(2, n // 26)
	if n % 26 >= 11 and n % 26 <= 25:
		nbytes += pow(2, n // 26)
	if n % 26 == 0:
		nbytes += pow(2, n // 26 - 1)
	print(bits, ' ', nibbles, ' ', nbytes)


def manage(bt, p):
	nibble = 0
	byte = 0
	if p // 10 >= 1:
		byte = bt
		bt = 0
	elif p // 10 == 0 and p // 2 >= 1:
		nibble = bt
		bt = 0
	print(bt, nibble, byte)
T = int(input())
for _ in range(T):
	N = int(input())
	if N < 3:
		print(1, 0, 0)
	else:
		N = N - 1
		x = N // 26
		bt = 2 ** x
		p = N - 26 * x
		manage(bt, p)


for i in range(int(input())):
	bit = 0
	nib = 0
	byt = 0
	n = int(input()) - 1
	a = int(n / 26)
	b = n % 26
	if b < 2:
		bit = 2 ** a
	elif b < 10:
		nib = 2 ** a
	else:
		byt = 2 ** a
	print(bit, nib, byt)


t = int(input())
for i in range(t):
	N = int(input())
	rem1 = N % 26
	div1 = (N - 1) // 26
	bit = 0
	nibble = 0
	byte = 0
	if rem1 <= 2 and rem1 > 0:
		bit = 1
	elif rem1 > 2 and rem1 <= 10:
		nibble = 1
	else:
		byte = 1
	multiple = 2 ** div1
	population = [bit * multiple, nibble * multiple, byte * multiple]
	print(*population)


T = int(input())
for _ in range(T):
	N = int(input()) - 1
	c = N // 26
	bits = 2 ** c
	p = N % 26
	if p < 2:
		print(bits, 0, 0)
	elif p < 10:
		print(0, bits, 0)
	else:
		print(0, 0, bits)


for i in range(int(input())):
	n = int(input()) - 1
	a = n // 26
	b = n % 26
	s = 2 ** a
	if b < 2:
		print(s, 0, 0)
	elif b < 10:
		print(0, s, 0)
	else:
		print(0, 0, s)


def main():
	T = int(input())
	for t in range(T):
		N = int(input())
		age = 0
		bit = 1
		nib = 0
		byt = 0
		for n in range(N):
			if age == 2:
				nib = bit
				bit = 0
			if age == 10:
				byt = nib
				nib = 0
			if age == 26:
				bit = 2 * byt
				byt = 0
				age = 0
			age += 1
		print(bit, nib, byt)
main()


T = int(input())
for _ in range(0, T):
	n = int(input()) - 1
	byte = max(2 ** (n // 26), 1)
	a = n % 26
	if a < 2:
		print(byte, 0, 0)
	elif a < 10:
		print(0, byte, 0)
	else:
		print(0, 0, byte)


t = int(input())
for i in range(t):
	n = int(input()) - 1
	byte = max(2 ** (n // 26), 1)
	remainder = n % 26
	if remainder < 2:
		print(byte, '0 0')
	elif remainder < 10:
		print('0', byte, '0')
	else:
		print('0 0', byte)


for _ in range(int(input())):
	N = int(input())
	y = N % 26
	x = 2 ** (N // 26)
	if y == 0:
		x = 2 ** (N // 26 - 1)
		print('0 0', x)
	elif y <= 2:
		print(x, '0 0')
	elif y > 2 and y <= 10:
		print('0', x, '0')
	elif y > 10 and y <= 26:
		print('0 0', x)


def bitd(t, bit):
	if t <= 2:
		return (bit, 0, 0)
	elif 2 < t <= 10:
		return (0, bit)
	elif 10 < t <= 26:
		return (0, 0, bit)
	else:
		return bitd(t - 26, 2 * bit, 0, 0)
n = int(input())
for i in range(n):
	t = int(input())
	a = t // 26
	b = t % 26
	if b == 0:
		print(0, 0, 2 ** (a - 1))
	elif t % 26 <= 2:
		print(2 ** a, 0, 0)
	elif 2 < b <= 10:
		print(0, 2 ** a, 0)
	elif 10 < b < 26:
		print(0, 0, 2 ** a)


get_int = lambda : int(input())
get_mint = lambda : list(map(int, input().split()))
for _ in range(get_int()):
	N = get_int()
	population = [0, 0, 0]
	m = N % 26
	l = N // 26
	if m == 0:
		population[2] = 2 ** (l - 1)
	elif m > 0 and m <= 2:
		population[0] = 2 ** l
	elif m > 2 and m <= 10:
		population[1] = 2 ** l
	elif m > 8 and m < 26:
		population[2] = 2 ** l
	print(' '.join(map(str, population)))


for _ in range(int(input())):
	N = int(input())
	c = 1
	ctype = 1
	while True:
		if ctype == 1 and N > 2:
			ctype = 2
			N -= 2
		elif ctype == 2 and N > 8:
			ctype = 3
			N -= 8
		elif ctype == 3 and N > 16:
			ctype = 1
			c *= 2
			N -= 16
		else:
			break
	if ctype == 1:
		print(c, 0, 0)
	elif ctype == 2:
		print(0, c, 0)
	else:
		print(0, 0, c)


import math
for t in range(int(input())):
	n = int(input())
	a = math.ceil(n / 26)
	b = n % 26
	c = 2 ** (a - 1)
	if b > 0 and b < 3:
		print(c, 0, 0)
	elif b > 2 and b < 11:
		print(0, c, 0)
	else:
		print(0, 0, c)


t = input()
for c in range(0, int(t)):
	x = int(input())
	if x % 26 == 0:
		p = x // 26 - 1
	else:
		p = x // 26
	p = 2 ** p
	b = x % 26
	if b in range(1, 3):
		print(p, 0, 0)
	elif b in range(3, 11):
		print(0, p, 0)
	else:
		print(0, 0, p)


for _ in range(int(input())):
	n = int(input()) - 1
	bits = 2 ** (n // 26)
	remain_ms = n % 26
	if remain_ms < 2:
		print(bits, 0, 0)
	elif remain_ms < 10:
		print(0, bits, 0)
	else:
		print(0, 0, bits)


for _ in range(int(input())):
	n = int(input())
	c = 1
	ct = 1
	while True:
		if ct == 1 and n > 2:
			ct = 2
			n -= 2
		elif ct == 2 and n > 8:
			ct = 3
			n -= 8
		elif ct == 3 and n > 16:
			ct = 1
			c *= 2
			n -= 16
		else:
			break
	if ct == 1:
		print(c, 0, 0)
	elif ct == 2:
		print(0, c, 0)
	else:
		print(0, 0, c)


from collections import *
from math import *
from sys import *
T = int(input())
for _ in range(T):
	N = int(input())
	if N % 26 == 0:
		print(0, 0, int(pow(2, N // 26 - 1)))
	elif N % 26 <= 2:
		print(int(pow(2, N // 26)), 0, 0)
	elif N % 26 <= 10:
		print(0, int(pow(2, N // 26)), 0)
	else:
		print(0, 0, int(pow(2, N // 26)))


for i in range(int(input())):
	t = int(input())
	if 0 < t % 26 <= 2:
		print(2 ** (t // 26), ' 0 0')
	elif 2 < t % 26 <= 10:
		print('0 ', 2 ** (t // 26), ' 0')
	elif 10 < t % 26:
		print('0 0 ', 2 ** (t // 26))
	elif t % 26 == 0:
		print('0 0 ', 2 ** (t // 26 - 1))


for _ in range(int(input())):
	n = int(input())
	x = 2 ** (n // 26)
	y = n % 26
	if y > 10:
		print(0, 0, x)
	elif y < 11 and y > 2:
		print(0, x, 0)
	elif y == 0:
		print(0, 0, x // 2)
	else:
		print(x, 0, 0)


T = int(input())
for index in range(T):
	N = int(input())
	for i in range(N):
		if 26 * i < N and N <= 26 * i + 2:
			print(2 ** (N // 26), 0, 0)
			break
		elif 26 * i + 2 < N and N <= 26 * i + 10:
			print(0, 2 ** (N // 26), 0)
			break
		elif 26 * i + 10 < N and N < 26 * i + 26:
			print(0, 0, 2 ** (N // 26))
			break
		elif N == 26 * i:
			print(0, 0, 2 ** (N // 26 - 1))
			break


for _ in range(int(input())):
	n = int(input())
	q = n // 26
	r = n % 26
	if q == 0 and r == 0:
		print('0 0 0')
	elif r > 0 and r <= 2:
		print(str(2 ** q) + ' 0 0')
	elif r > 2 and r <= 10:
		print('0 ' + str(2 ** q) + ' 0')
	elif r > 8 and r < 26:
		print('0 0 ' + str(2 ** q))
	elif q > 0 and r == 0:
		print('0 0 ' + str(2 ** (q - 1)))


tests = int(input())
for i in range(tests):
	time = int(input()) - 1
	divisions = time // 26
	mod_val = time % 26
	if mod_val < 2:
		print(2 ** divisions, 0, 0)
	elif 2 <= mod_val < 10:
		print(0, 2 ** divisions, 0)
	else:
		print(0, 0, 2 ** divisions)


for _ in range(int(input())):
	ms = int(input()) - 1
	bit = 1
	nib = 0
	byte = 0
	cnt = 2
	while ms > 0:
		ms -= 1
		cnt -= 1
		if cnt == 0 and bit > 0:
			nib += bit
			bit = 0
			cnt = 8
		if cnt == 0 and nib > 0:
			byte += nib
			nib = 0
			cnt = 16
		if cnt == 0 and byte > 0:
			bit += 2 * byte
			byte = 0
			cnt = 2
	print(bit, nib, byte)


for _ in range(int(input())):
	t = int(input())
	bit = 1 << t // 26
	rem = t % 26
	nibble = byte = 0
	if rem > 0 and rem <= 2:
		print(f'{bit} 0 0')
	elif rem > 2 and rem <= 10:
		print(f'0 {bit} 0')
	elif rem > 10 and rem < 26:
		print(f'0 0 {bit}')
	else:
		print(f'0 0 {bit // 2}')


t = int(input())
for i in range(t):
	n = int(input())
	x1 = 1
	x2 = 0
	x3 = 0
	while n > 0:
		x = n - 2
		y = n - 8
		z = n - 16
		if z > 0 and x3 > 0:
			x1 = x3 * 2
			x3 = 0
			n = z
		elif y > 0 and x2 > 0:
			x3 = x2
			x2 = 0
			n = y
		elif x > 0 and x1 > 0:
			x2 = x1
			x1 = 0
			n = x
		else:
			break
	print(f'{x1} {x2} {x3}')


t = int(input())
while t > 0:
	t = t - 1
	pop = [0, 0, 0]
	n = int(input())
	if n % 26 > 0 and n > 26:
		pop[0] = 2 ** (n // 26)
		if n % 26 > 10:
			pop[2] = 2 ** (n // 26)
			pop[0] = 0
		elif n % 26 > 2:
			pop[1] = 2 ** (n // 26)
			pop[0] = 0
	elif n % 26 == 0:
		pop[2] = 2 ** (n // 26 - 1)
	if n <= 26:
		if n > 10:
			pop[2] = 1
		elif n > 2:
			pop[1] = 1
		else:
			pop[0] = 1
	print(*pop, ' ')


for _ in range(int(input())):
	n = int(input())
	x = (n - 1) // 26
	if n % 26 == 1 or n % 26 == 2:
		print(2 ** x, 0, 0, sep=' ')
	elif n % 26 < 11 and n % 26 != 0:
		print(0, 2 ** x, 0, sep=' ')
	else:
		print(0, 0, 2 ** x, sep=' ')


for _ in range(int(input())):
	n = int(input())
	n = n - 1
	ans = 2 ** (n // 26)
	n = n % 26
	if n >= 10:
		print(0, 0, ans)
	elif n >= 2:
		print(0, ans, 0)
	else:
		print(ans, 0, 0)


t = int(input())
for __ in range(t):
	n = int(input())
	n = n - 1
	num = pow(2, n // 26)
	n = n % 26
	if n >= 10:
		print(0, 0, num)
	elif n >= 2:
		print(0, num, 0)
	else:
		print(num, 0, 0)


T = int(input())
for i in range(T):
	n = int(input()) - 1
	mod = n % 26
	cycles = int((n - mod) / 26)
	citizens = 2 ** cycles
	if mod <= 1:
		print(f'{citizens} 0 0')
	elif mod <= 9:
		print(f'0 {citizens} 0')
	else:
		print(f'0 0 {citizens}')


T = int(input())
for i in range(T):
	N = int(input())
	N = N - 1
	if N % 26 < 2:
		print(2 ** (N // 26), 0, 0)
	elif N % 26 < 10:
		print(0, 2 ** (N // 26), 0)
	else:
		print(0, 0, 2 ** (N // 26))


for _ in range(int(input())):
	t = int(input()) - 1
	arr = [1, 0, 0]
	arr[0] = 2 ** (t // 26)
	t -= t // 26 * 26
	if t < 2:
		pass
	elif 2 <= t < 10:
		(arr[0], arr[1]) = (arr[1], arr[0])
	else:
		(arr[0], arr[2]) = (arr[2], arr[0])
	print(*arr)


for tc in range(int(input())):
	n = int(input())
	a = n // 26
	b = n % 26
	if 0 < b <= 2:
		print(pow(2, a), 0, 0)
	elif 3 <= b and b <= 10:
		print(0, pow(2, a), 0)
	elif b == 0:
		print(0, 0, pow(2, a - 1))
	else:
		print(0, 0, pow(2, a))


for _ in range(int(input())):
	n = int(input())
	a = 2 ** int(n / 26)
	b = n % 26
	c = ''
	if b == 1 or b == 2:
		c += str(a) + ' 0 0'
	elif 3 <= b and b <= 10:
		c += '0 ' + str(a) + ' 0'
	elif b == 0:
		c += '0 0 ' + str(int(a / 2))
	else:
		c += '0 0 ' + str(a)
	print(c)


for _ in range(int(input())):
	n = int(input())
	n = n - 1
	x = n // 26
	p = 1 << x
	if n % 26 < 2:
		print(p, '0', '0')
	elif 2 <= n % 26 < 10:
		print('0', p, '0')
	else:
		print('0', '0', p)


for _ in range(int(input())):
	n = int(input())
	count = 1
	ncount = 0
	bcount = 0
	while n != 0:
		if n <= 2:
			n = 0
		elif n <= 10:
			ncount += count
			n = 0
			count -= count
		elif n <= 26:
			bcount += count
			n = 0
			count -= count
		else:
			count = count * 2
			n -= 26
	print(count, ncount, bcount, sep=' ')


t = int(input())
for ts in range(t):
	n = int(input())
	l = [1, 0, 0]
	m = [0, 0, 0]
	a = 2 ** ((n - 1) // 26)
	r = (n - 1) % 26
	if r < 2:
		l = [a, 0, 0]
	elif r < 10:
		l = [0, a, 0]
	else:
		l = [0, 0, a]
	for i in l:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	t = int(input()) - 1
	e = t // 26
	ans = 2 ** e
	if t % 26 < 2:
		print(ans, 0, 0)
	elif t % 26 < 10:
		print(0, ans, 0)
	else:
		print('0 0', ans)


t = int(input())
for _ in range(t):
	n = int(input())
	if n % 26 != 0 or n == 0:
		p = n // 26
	elif n % 26 == 0:
		p = int(n / 26 - 1)
	k = 2 ** p
	d = n - 26 * p
	if 0 <= d <= 2:
		print(k, 0, 0)
	elif 3 <= d <= 10:
		print(0, k, 0)
	elif 11 <= d <= 26:
		print(0, 0, k)


t = int(input())
while t > 0:
	n = int(input())
	x = (n - 1) // 26
	if n % 26 == 1 or n % 26 == 2:
		print(2 ** x, ' ', 0, ' ', 0)
	elif n % 26 < 11 and n % 26 != 0:
		print(0, ' ', 2 ** x, ' ', 0)
	else:
		print(0, ' ', 0, ' ', 2 ** x)
	t = t - 1


for _ in range(int(input())):
	n = int(input())
	k = n // 26
	r = n % 26
	if n == 0:
		print(1, 0, 0)
	elif r == 0:
		print(0, 0, 2 ** (k - 1))
	elif r < 3:
		print(2 ** k, 0, 0)
	elif r < 11:
		print(0, 2 ** k, 0)
	else:
		print(0, 0, 2 ** k)


for _ in range(int(input())):
	n = int(input())
	n -= 1
	bit = 2 ** (n // 26)
	nibble = byte = 0
	if n % 26 < 2:
		print(bit, 0, 0)
	elif n % 26 < 10:
		print(0, bit, 0)
	else:
		print(0, 0, bit)


import math
for i in range(int(input())):
	n = int(input()) - 1
	pw = int(n // 26)
	res = int(math.pow(2, pw))
	if 0 <= n % 26 < 2:
		print(f'{res} 0 0')
	elif 2 <= n % 26 < 10:
		print(f'0 {res} 0')
	else:
		print(f'0 0 {res}')


n = int(input())
for i in range(n):
	t = int(input()) - 1
	x = t // 26
	p = 2 ** x
	y = t % 26
	if y < 2:
		print(p, 0, 0)
	elif y < 10:
		print(0, p, 0)
	else:
		print(0, 0, p)


for _ in range(int(input())):
	n = int(input()) - 1
	q = n // 26
	r = n % 26
	a = 2 ** q
	b1 = 0
	n1 = 0
	b2 = 0
	if 2 > r:
		b1 = a
	elif 10 > r:
		n1 = a
	else:
		b2 = a
	print(b1, n1, b2)


t = int(input())
for _ in range(t):
	n = int(input())
	n = n - 1
	exp = n // 26
	s = 1 << exp
	if n % 26 < 2:
		print(s, 0, 0)
	elif n % 26 < 10:
		print(0, s, 0)
	else:
		print(0, 0, s)


t = int(input())
for _ in range(t):
	n = int(input())
	n -= 1
	k = 2 ** (n // 26)
	rem = n % 26
	if 0 <= rem <= 1:
		print(k, 0, 0)
	elif 2 <= rem <= 9:
		print(0, k, 0)
	else:
		print(0, 0, k)


n = int(input())
for i in range(n):
	N = int(input())
	if N % 26 == 0:
		N -= 1
	x = N % 26
	x1 = N // 26
	if x <= 2:
		print(pow(2, x1), 0, 0)
	elif x <= 10:
		print(0, pow(2, x1), 0)
	else:
		print(0, 0, pow(2, x1))


for t in range(int(input())):
	N = int(input())
	N -= 1
	n = int(N / 26)
	r = N % 26
	if r < 2:
		print(2 ** n, 0, 0)
	elif r < 10:
		print(0, 2 ** n, 0)
	else:
		print(0, 0, 2 ** n)


t = int(input())
for _ in range(t):
	n = int(input())
	if n % 26 == 0:
		n -= 1
	r = n % 26
	x = n // 26
	b = 2 ** x
	if r <= 2:
		print(b, 0, 0)
	elif r <= 10:
		print(0, b, 0)
	else:
		print(0, 0, b)