Given a positive integer n. Find three distinct positive integers a, b, c such that a + b + c = n and \operatorname{gcd}(a, b) = c, where \operatorname{gcd}(x, y) denotes the [greatest common divisor (GCD)](https://en.wikipedia.org/wiki/Greatest_common_divisor) of integers x and y.

Input

The input consists of multiple test cases. The first line contains a single integer t (1 ≤ t ≤ 10^5) — the number of test cases. Description of the test cases follows.

The first and only line of each test case contains a single integer n (10 ≤ n ≤ 10^9).

Output

For each test case, output three distinct positive integers a, b, c satisfying the requirements. If there are multiple solutions, you can print any. We can show that an answer always exists.

Example

Input


6
18
63
73
91
438
122690412


Output


6 9 3
21 39 3
29 43 1
49 35 7
146 219 73
28622 122661788 2

Note

In the first test case, 6 + 9 + 3 = 18 and \operatorname{gcd}(6, 9) = 3.

In the second test case, 21 + 39 + 3 = 63 and \operatorname{gcd}(21, 39) = 3.

In the third test case, 29 + 43 + 1 = 73 and \operatorname{gcd}(29, 43) = 1.

Source: codeforces | Difficulty: EASY
Tags: Number theory

Complete search

Mathematics

Constructive algorithms


Solutions:
def main():
	for _ in range(int(input())):
		n = int(input())
		if n % 2 == 0:
			print(2, n - 2 - 1, 1)
		else:
			n -= 1
			n = n // 2
			if n % 2 == 0:
				print(n - 1, n + 1, 1)
			else:
				print(n - 2, n + 2, 1)
main()


import math
for _ in range(int(input())):
	n = int(input()) - 1
	for i in range(2, n):
		if math.gcd(i, n - i) == 1:
			print(i, n - i, 1)
			break


from math import gcd

class predefine:

	def intt(self):
		return int(input())

	def strng(self):
		return input()

	def lst(self):
		return list(map(int, input().split()))

class letdo:

	def solve(self):
		pd = predefine()
		n = pd.intt() - 1
		l = n - 2
		while gcd(l, n - l) != 1:
			l -= 1
		print(l, n - l, 1)

	def solution(self):
		pd = predefine()
		c = pd.intt()
		while c:
			self.solve()
			c -= 1
test = letdo()
test.solution()


from math import *
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def st():
	return input().rstrip('\n')

def lis():
	return list(map(int, input().split()))

def ma():
	return map(int, input().split())
t = inp()
while t:
	t -= 1
	n = inp()
	x = n - 1
	y = x // 2
	z = x - y
	if n % 2:
		po = 3
		while 1:
			if gcd(po, n - po - 1) == 1:
				y = po
				z = n - po - 1
				break
			po += 2
	print(y, z, 1)


for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2 - 1, n // 2, 1)
	elif (n - 1) // 2 % 2 == 1:
		print(n // 2 - 2, n // 2 + 2, 1)
	else:
		print(n // 2 - 1, n // 2 + 1, 1)


T = int(input())
while T > 0:
	T -= 1
	n = int(input())
	if n & 1 == 0:
		print(f'{n // 2 - 1} {n // 2} 1')
	elif n // 2 & 1 == 0:
		print(f'{n // 2 - 1} {n // 2 + 1} 1')
	else:
		print(f'{n // 2 - 2} {n // 2 + 2} 1')


import sys
IN = sys.stdin
OUT = sys.stdout
tc = int(IN.readline())
for ti in range(tc):
	n = int(IN.readline())
	for b in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37):
		a = n - b - 1
		if a % b != 0:
			print(a, b, 1)
			break
	else:
		print(1 / 0)


from itertools import groupby
from collections import OrderedDict
import math
from collections import Counter
import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()

def lcm(a, b):
	return a // math.gcd(a, b) * b

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	n = str(n)
	return int(n, 2)

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n
t = int(input())
for qq in range(t):
	n = int(input())
	if n % 2 == 0:
		print(n // 2, n // 2 - 1, 1)
	else:
		x = n // 2 + 1
		if x % 2 == 1:
			print(x, x - 2, 1)
		else:
			x += 1
			print(x, n - x - 1, 1)


def primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]
f = primes(10 ** 5 - 1)
a = int(input())
for x in range(a):
	b = int(input())
	(c, d, e) = (0, 0, 0)
	if b % 2 == 0:
		e = 1
		d = 2
		c = b - 3
	else:
		e = 1
		for x in range(len(f)):
			if (b - 1 - f[x]) % f[x] != 0:
				c = b - 1 - f[x]
				d = f[x]
				break
	print(c, d, e)


import typing

def main() -> typing.NoReturn:
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n % 2 == 0:
			c = 1
			n -= 1
			(a, b) = ((n + 1) // 2, n // 2)
		else:
			c = 1
			n -= 1
			h = n // 2
			if h & 1:
				(a, b) = (h + 2, h - 2)
			else:
				(a, b) = (h + 1, h - 1)
		print(a, b, c)
main()


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	a = n // 2
	b = n // 2
	if n % 2:
		n -= 1
		if n // 2 % 2:
			a -= 2
			b += 2
		else:
			a -= 1
			b += 1
	else:
		b -= 1
	c = 1
	print(a, b, c)


import math

def isprime(x):
	i = 2
	while i * i <= x:
		if x % i == 0:
			return 0
		i = i + 1
	return 1

def abc(n):
	if (n - 1) % 2 != 0:
		return str((n - 1) // 2) + ' ' + str((n - 1) // 2 + 1) + ' ' + str(1)
	else:
		h = (n - 1) // 2
		if h % 2 == 0:
			return str(h - 1) + ' ' + str(h + 1) + ' ' + str(1)
		else:
			return str(h - 2) + ' ' + str(h + 2) + ' ' + str(1)
t = int(input())
l = []
for x in range(t):
	n = int(input())
	l.append(n)
op = []
for x in l:
	ans = abc(x)
	op.append(ans)
for o in op:
	print(o)


from math import gcd
for _ in range(int(input())):
	n = int(input())
	if n % 2:
		j = n // 2
		i = 1
		while gcd(j - i, j + i) != 1:
			i += 1
		print(j - i, j + i, 1)
	else:
		print(n // 2, n // 2 - 1, 1)


from math import gcd

def number_checker(x):
	if x % 2 == 0:
		return True
	return False
for _ in range(int(input())):
	n = int(input())
	c = 1
	ans = 0
	mid = n // 2
	(x, y) = (0, 0)
	if number_checker(n):
		x_ = n // 2
		y_ = x_ - 1
		print(x_, y_, c)
	else:
		(i, j) = (1, 2)
		while ans != n:
			x = mid + i
			y = mid - i
			if x + y + c == n and c == gcd(x, y):
				ans = n
				print(x, y, c)
			i += 1


import math
T = int(input())
for t in range(T):
	n = int(input())
	i = 2
	j = n - 3
	while 1:
		if math.gcd(i, j) == 1:
			print(i, j, 1)
			break
		else:
			i += 1
			j -= 1


import os, sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
try:
	(sys.stdin, sys.stdout) = (open('in.txt', 'r'), open('out.txt', 'w'))
except:
	pass
ii1 = lambda : int(sys.stdin.readline().strip())
is1 = lambda : sys.stdin.readline().strip()
iia = lambda : list(map(int, sys.stdin.readline().strip().split()))
isa = lambda : sys.stdin.readline().strip().split()
mod = int(1000000000.0 + 7)
from math import inf
from collections import defaultdict as dd
from math import gcd

def main(tt):
	n = ii1()
	if n % 2 == 0:
		c = 1
		n -= 1
		a = n // 2
		b = n // 2
		b += 1
		assert gcd(a, b) == c
		print(a, b, c)
		return
	else:
		c = 1
		n -= 1
		(a, b) = (n // 2, n // 2)
		a += 1
		b -= 1
		if gcd(a, b) == 1:
			print(a, b, c)
			return
		for i in range(2, n + 1):
			(a, b) = (i, n - i)
			if gcd(a, b) == 1 and a != b:
				print(a, b, c)
				return
	assert 1 == 2
t = 1
t = ii1()
for _ in range(t):
	main(_)


from math import *
from functools import *
from time import *
from sys import *
print = stdout.write

def pfactor(n):
	if not n % 2:
		return 2
	return 1
	if pow(2, n - 1, n) == n:
		return 1
	for p in range(2, int(n ** 0.5) + 1):
		if not n % p:
			return p
		if n == 1 or p > int(n ** 0.5) + 5:
			return 1
	return 1

def f(n):
	k = pfactor(n)
	if k == n:
		k = 1
	for i in range(1, n // k + 1):
		if gcd(n - k - i * k, i * k) == k and k > 0 and (n - k - i * k > 0) and (len(set((k, n - k - i * k, i * k))) == 3):
			return (i * k, n - k - i * k, k)

@lru_cache(maxsize=None)
def f2(n):
	for a in range(1, n):
		for b in range(1, n):
			if gcd(a, b) + a + b == n and a != b and (a != gcd(a, b)) and (b != gcd(a, b)):
				return (a, b, gcd(a, b))
a = int(input())
lls = []
for i in range(1, a + 1):
	ll = int(input())
	k = f(ll)
	if not k:
		k = f2(ll)
	if not k:
		print(9024)
	lls.append(str(k[0]) + ' ' + str(k[1]) + ' ' + str(k[2]))
lls = '\n'.join(lls)
print(lls)
print('\n')


t = int(input())
ans = []
simple = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571]
for i in range(t):
	n = int(input())
	if n % 2 == 0:
		ans.append((n - 3, 2, 1))
	else:
		for j in simple:
			if (n - j - 1) % j != 0:
				ans.append((n - j - 1, j, 1))
				break
for i in ans:
	print(*i)


import sys

def input():
	return sys.stdin.readline().rstrip()
DXY = [(0, -1), (1, 0), (0, 1), (-1, 0)]
mod = 998244353
inf = 1 << 64

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		if n % 2 == 0:
			print(n - 3, 2, 1)
		else:
			k = n // 6
			if n % 6 == 1:
				if k % 2 == 0:
					print(3 * k + 1, 3 * k - 1, 1)
				else:
					print(3 * k + 2, 3 * k - 2, 1)
			elif n % 6 == 3:
				print(4 * k + 1, 2 * k + 1, 1)
			else:
				print(4 * k + 3, 2 * k + 1, 1)
	return 0
main()


def main():
	import sys
	input = sys.stdin.buffer.readline
	import math

	def prime_numbers(x):
		if x < 2:
			return []
		prime_numbers = [i for i in range(x)]
		prime_numbers[1] = 0
		for prime_number in prime_numbers:
			if prime_number > math.sqrt(x):
				break
			if prime_number == 0:
				continue
			for composite_number in range(2 * prime_number, x, prime_number):
				prime_numbers[composite_number] = 0
		return [prime_number for prime_number in prime_numbers if prime_number != 0]

	def soinnsuu(x):
		s = set()
		for i in primes:
			if i > int(math.sqrt(x)):
				break
			elif x % i == 0:
				while x % i == 0:
					x //= i
				s.add(i)
		if not x == 1:
			s.add(x)
		return s
	from math import gcd
	primes = prime_numbers(50000)
	for _ in range(int(input())):
		n = int(input())
		s = soinnsuu(n - 1)
		for i in primes:
			if i not in s:
				print(n - i - 1, i, 1)
				break
		else:
			print(n)
main()


t = int(input())
for i in range(t):
	n = int(input())
	if n % 2 == 0:
		print(n - 3, 2, 1)
	else:
		n = n - 1
		n = n // 2
		if n % 2 == 0:
			print(n + 1, n - 1, 1)
		else:
			print(n + 2, n - 2, 1)


import math
n = int(input())
for _ in range(n):
	number = int(input())
	for a in range(2, number):
		b = number - a - 1
		if math.gcd(a, b) == 1:
			print('{} {} {}'.format(a, b, 1))
			break


import random
from collections import Counter, defaultdict
from copy import deepcopy as dc
from math import gcd
try:
	t = int(input())
	for tt in range(1, t + 1):
		n = int(input())
		j = 1
		while j < n:
			flag = 0
			for i in range(2, n - j):
				if gcd(i, n - j - i) == 1 and i != n - j - 1 and (i != 1) and (n - i - j != 1):
					print(i, n - i - 1, 1)
					flag = 1
					break
			if flag == 1:
				break
			j += 1
except EOFError as e:
	pass


for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		a = n // 2 - 1
		b = n // 2
		c = 1
		print(a, b, c)
	else:
		x = (n - 3) // 2
		if x % 2 != 0:
			a = x
			b = x + 2
			c = 1
			print(a, b, c)
		else:
			a = (n - 1) // 2 - 2
			b = (n - 1) // 2 + 2
			c = 1
			print(a, b, c)


import sys
import math
input = sys.stdin.readline
MAX = sys.maxsize
MIN = -sys.maxsize - 1

def inp():
	return int(input())

def inpl():
	return list(map(int, input().split()))

def inpstr():
	return list(map(str, input().split()))

def inpstrl():
	res = []
	for c in str(input()):
		res.append(c)
	res.pop(-1)
	return res

def findMaxCrossingSubarray(arr, low, mid, high):
	sum = 0
	leftSum = MIN
	rightSum = MIN
	i = mid
	while i >= low:
		sum += arr[i]
		if sum > leftSum:
			leftSum = sum
			maxLeft = i
		i -= 1
	sum = 0
	j = mid + 1
	while j <= high:
		sum += arr[j]
		if sum > rightSum:
			rightSum = sum
			maxRight = j
		j += 1
	return (maxLeft, maxRight, leftSum + rightSum)

def findMaxSubarray(arr, low, high):
	if high == low:
		return (low, high, arr[low])
	else:
		mid = math.floor((low + high) / 2)
		(leftLow, leftHigh, leftSum) = findMaxSubarray(arr, low, mid)
		(rightLow, rightHigh, rightSum) = findMaxSubarray(arr, mid + 1, high)
		(crossLow, crossHigh, crossSum) = findMaxCrossingSubarray(arr, low, mid, high)
		if leftSum >= rightSum and leftSum >= crossSum:
			return (leftLow, leftHigh, leftSum)
		elif rightSum >= leftSum and rightSum >= crossSum:
			return (rightLow, rightHigh, rightSum)
		else:
			return (crossLow, crossHigh, crossSum)

def binarySearch(x, mid, arr, n):
	if x == arr[mid - 1] or (x > arr[mid - 2] and x < arr[mid - 1]) or (mid == 1 and x < arr[mid - 1]):
		return mid
	elif x > arr[mid - 1]:
		return binarySearch(x, mid + math.ceil((n - mid) / 2), arr, n)
	else:
		return binarySearch(x, mid - math.ceil(mid / 2), arr, mid)

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def solve(n):
	a = 0
	b = 0
	c = 1
	r = 0
	dif = n - c
	if dif % 2 != 0:
		r = 1
	hdif = int(dif / 2)
	if hdif % 2 == 0 and r == 1:
		a = hdif
		b = a + 1
	elif hdif % 2 == 0 and r == 0:
		a = hdif + 1
		b = hdif - 1
	elif hdif % 2 != 0 and r == 1:
		a = hdif
		b = a + 1
	elif hdif % 2 != 0 and r == 0:
		a = hdif - 2
		b = hdif + 2
	res = []
	res.append(a)
	res.append(b)
	res.append(c)
	return res
res = []
iter = inp()
i = 0
while i < iter:
	n = inp()
	result = solve(n)
	res.append(result)
	i += 1
for r in res:
	print(*r)


from collections import *
import sys
import io, os
import math
from heapq import *
gcd = math.gcd
sqrt = math.sqrt

def ceil(a, b):
	a = -a
	k = a // b
	k = -k
	return k
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def strinp(testcases):
	k = 5
	if testcases == -1 or testcases == 1:
		k = 1
	f = str(input())
	f = f[2:len(f) - k]
	return f

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n % 2 == 0:
			a = n // 2
			print(a, a - 1, 1)
			continue
		k = n // 2
		if k % 2:
			print(k - 2, k + 2, 1)
			continue
		print(k - 1, k + 1, 1)
main()


def solve(n):
	if n % 2:
		a = (n - 1) // 2
		if a % 2:
			print(a - 2, a + 2, 1)
		else:
			print(a - 1, a + 1, 1)
	else:
		a = n // 2
		print(a - 1, a, 1)
t = int(input())
while t:
	n = int(input())
	solve(n)
	t -= 1


from sys import stdin, stdout, setrecursionlimit
from math import gcd, sqrt, factorial, pi, inf
from collections import deque, defaultdict
from bisect import bisect, bisect_left
from time import time
from itertools import permutations as per
from heapq import heapify, heappush, heappop, heappushpop
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\r\n')
L = lambda : list(R())
P = lambda x: stdout.write(str(x) + '\n')
lcm = lambda x, y: x * y // gcd(x, y)
nCr = lambda x, y: f[x] * inv(f[y] * f[x - y] % N) % N
inv = lambda x: pow(x, N - 2, N)
sumx = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7

def get(a):
	ans = 0
	a = a[::-1]
	for i in range(0, len(a), k):
		ans += a[i]
	return ans * 2
for _ in range(I()):
	n = I()
	if n % 2:
		x = y = n // 2
		x -= 1
		y += 1
		if x % 2:
			print(x, y, 1)
		else:
			x -= 1
			y += 1
			print(x, y, 1)
	else:
		n -= 1
		print(n // 2, n // 2 + 1, 1)


def solve():
	n = int(input())
	if n % 2 == 0:
		w = n // 2
		print(w - 1, w, 1)
	else:
		w = n // 2
		if w % 2 == 0:
			print(w - 1, w + 1, 1)
		else:
			print(w - 2, w + 2, 1)
t = int(input())
while t != 0:
	solve()
	t -= 1


from sys import stdin
from math import gcd
input = stdin.readline
rn = lambda : int(input())
rns = lambda : map(int, input().split())
rl = lambda : list(map(int, input().split()))
rs = lambda : input().strip()
YN = lambda x: print('YES') if x else print('NO')
ceil_div = lambda a, b: -(-a // b)
mod = 10 ** 9 + 7
for _ in range(rn()):
	n = rn()
	if n % 2 == 0:
		print(2, n - 3, 1)
	else:
		q = 1
		k = n // 2
		while gcd(k - q, k + q) != 1:
			q += 1
		print(k - q, k + q, 1)


primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53]
T = int(input())
for x in range(T):
	N = int(input())
	N -= 1
	for p in primes:
		if N % p != 0:
			print(str(p) + ' ' + str(N - p) + ' 1')
			break


import sys
input = sys.stdin.readline
print = sys.stdout.write
thing = [2, 3, 5, 7, 11, 13, 17, 23, 29]
for i in range(int(input())):
	a = int(input())
	a -= 1
	for i in thing:
		if a % i != 0:
			print(' '.join([str(i), str(a - i), str(1)]) + '\n')
			break


def find(n):
	k = n - 1
	c = 1
	if k % 2 == 1:
		a = int(k / 2)
		b = a + 1
		return str(a) + ' ' + str(b) + ' 1'
	p = int(k / 2)
	if p % 2 == 0:
		return str(p - 1) + ' ' + str(p + 1) + ' 1'
	return str(p - 2) + ' ' + str(p + 2) + ' 1'
cases = int(input())
for i in range(cases):
	n = int(input())
	print(find(n))


import sys, math

def solve():
	n = int(input())
	a = 2
	while True:
		b = n - a - 1
		if math.gcd(a, b) == 1:
			print(a, b, 1)
			break
		a += 1
t = int(input())
while t != 0:
	solve()
	t -= 1


from sys import stdin, stdout
input = stdin.readline

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
t = int(input())
for _ in range(t):
	n = int(input())
	if (n - 1) % 2:
		print((n - 1) // 2, n // 2, 1)
		continue
	i = 3
	while 1:
		if i != n - i - 1 and gcd(i, n - i - 1) == 1:
			print(i, n - i - 1, 1)
			break
		i += 1


t = int(input())
for www in range(t):
	n = int(input())
	if n % 2 == 0:
		print((n - 2) // 2, (n - 2) // 2 + 1, 1)
	elif n % 4 == 1:
		print((n - 3) // 2, (n - 3) // 2 + 2, 1)
	else:
		print((n - 5) // 2, (n - 5) // 2 + 4, 1)


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
import bisect
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
ABCD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
months = {1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	n = int(input())
	c = 1
	a = n - 2
	b = 1
	while True:
		if math.gcd(a, b) == 1 and b != 1:
			break
		a -= 1
		b += 1
	print(a, b, c)


import math
tc = int(input())
while tc:
	tc -= 1
	n = int(input())
	n -= 1
	c = 1
	if n % 2 == 0:
		for i in range(3, math.ceil(n / 2), 2):
			x1 = i
			x2 = n - i
			if math.gcd(x1, x2) == 1:
				print(x1, x2, c)
				break
	else:
		for i in range(2, math.ceil(n / 2), 2):
			x1 = i
			x2 = n - i
			if math.gcd(x1, x2) == 1:
				print(x1, x2, c)
				break


import math

def find_div(num):
	for i in range(num // 2, 1, -1):
		if math.gcd(i, num - i) == 1:
			return i
problem_num = int(input())
for i in range(problem_num):
	S = int(input())
	c = 1
	a = find_div(S - 1)
	b = S - 1 - a
	print(a, b, c)


from math import gcd

def solve():
	n = int(input())
	z = 1
	for i in range(n - 3, 2, -1):
		if gcd(i, n - 1 - i) == 1:
			print(i, n - 1 - i, 1)
			break
q = int(input())
for _ in range(q):
	solve()


from math import gcd

def solve(n):
	c = 1
	if n % 2 == 0:
		a = (n - c) // 2
		b = n - c - a
		print(a, b, c)
		return
	for b in range(3, n // 2, 2):
		a = n - c - b
		if gcd(a, b) == 1:
			print(a, b, c)
			return

def main():
	t = int(input())
	for _ in range(t):
		solve(int(input()))
main()


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
MOD = 10 ** 9 + 7
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	for _ in range(int(input())):
		n = int(input())
		n -= 1
		for i in range(n // 2, n + 1):
			if gcd(i, n - i) == 1 and i != n - 1 != 1:
				print(i, n - i, 1)
				break
main()


def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def is_prime(n):
	if n < 5 or n & 1 == 0 or n % 3 == 0:
		return 2 <= n <= 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			p = p * p % n
			if p == n - 1:
				break
		else:
			return False
	return True
arr = prime_list(10 ** 5 + 2)
t = int(input())
for i in range(t):
	n = int(input())
	if n % 2 == 0:
		a = n // 2
		b = a - 1
		print(b, a, 1)
	elif n // 2 % 2 == 0:
		print(n // 2 + 1, n // 2 - 1, 1)
	else:
		print(n // 2 - 2, n // 2 + 2, 1)


import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	n = int(input())
	s = n // 2
	if n % 2 == 0:
		print(s - 1, s, 1)
	elif s % 2 == 0:
		print(s - 1, s + 1, 1)
	else:
		print(s - 2, s + 2, 1)


import sys
import math
from fractions import Fraction
from decimal import *
input = sys.stdin.readline
t = int(input())
while t > 0:
	n = int(input().strip())
	if n % 2 == 0:
		c = 1
		a = (n - 1) // 2
		b = a + 1
		print(a, b, c)
	else:
		c = 1
		a = (n - 1) // 2 - 1
		b = a + 2
		if a % 2 == 0:
			a -= 1
			b += 1
		print(a, b, c)
	t -= 1


for i in range(int(input())):
	num = int(input())
	c = 1
	num = num - 1
	if num % 2 == 1:
		a = 2
		b = num - 2
	else:
		a = b = num // 2
		if a % 2 == 1:
			a = a - 2
			b = b + 2
		else:
			a = a - 1
			b = b + 1
	print(a, b, c)


for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		c = 1
		a = (n - 1) // 2
		b = n // 2
		print(a, b, c)
	else:
		c = 1
		temp = (n - 1) // 2
		if temp % 2 == 0:
			a = temp - 1
			b = temp + 1
		else:
			a = temp - 2
			b = temp + 2
		print(a, b, c)


import math
x = int(input())
for i in range(x):
	y = int(input())
	ans = 1
	z = math.ceil(y ** 0.5)
	if y - 1 & 1 == 0:
		if (y - 1) % 4 == 0:
			print((y - 1) // 2 - 1, (y - 1) // 2 + 1, 1)
		else:
			print((y - 1) // 2 - 2, (y - 1) // 2 + 2, 1)
	else:
		print((y - 1) // 2, (y - 1) // 2 + 1, 1)


import math
n = int(input())
for j in range(n):
	a = int(input())
	if a % 2 == 0:
		for i in range(1, a):
			q = i * 2
			w = i
			e = a - q - w
			if math.gcd(e, q) == w:
				print(q, e, w)
				break
	else:
		for i in range(2, a):
			w = 1
			q = i
			e = a - q - w
			if math.gcd(e, q) == w:
				print(q, e, w)
				break


for _ in range(int(input())):
	n = int(input())
	if not n % 2:
		print(n - 3, 2, 1)
	else:
		z = n // 2
		if z % 2:
			print(z - 2, z + 2, 1)
		else:
			print(z - 1, z + 1, 1)


for i in range(int(input())):
	n = int(input())
	snt = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 167, 173, 179, 181, 191, 193, 199, 203, 207, 211, 227, 233, 239, 251, 257, 263, 269, 281, 293, 307, 311, 317, 337, 347, 353, 359, 379, 389, 401, 409, 419, 431, 443, 449, 461, 467, 479, 487, 491, 499, 503]
	for i in snt:
		if (n - i - 1) % i != 0:
			print(n - i - 1, i, 1)
			break


from sys import stdin, stdout
nmbr = lambda : int(input())
lst = lambda : list(map(int, input().split()))
for _ in range(nmbr()):
	n = nmbr()
	if n & 1 == 0:
		half = n // 2
		print(half, n - half - 1, 1)
		continue
	else:
		left = n - 1
		half = left // 2
		if half & 1:
			print(half - 2, half + 2, 1)
		else:
			print(half - 1, half + 1, 1)
		continue


import sys
from math import factorial, gcd
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify, nlargest, nsmallest
from itertools import groupby, accumulate
from copy import deepcopy
MOD = 10 ** 9 + 7
INF = float('inf')
input = sys.stdin.readline
rl = lambda : list(map(int, input().split()))
rs = lambda : sys.stdin.readline().strip()

def solve():
	for i in range(2, n):
		if gcd(i, n - i) == 1:
			return [i, n - i, 1]
for _ in range(int(input())):
	n = int(input())
	n -= 1
	print(*solve())


from math import gcd
for __ in range(int(input())):
	n = int(input()) - 1
	(a, b, c) = (0, 0, 1)
	for i in range(2, n):
		if gcd(i, n - i) == 1:
			(a, b) = (i, n - i)
			break
	print(a, b, c)


import math

def gcdProblem(n):
	for x in range(2, 31):
		if math.gcd(x, n - x - 1) == 1:
			return [x, n - x - 1, 1]
t = int(input())
for _ in range(t):
	n = int(input())
	ans = gcdProblem(n)
	print(ans[0], ans[1], ans[2])


for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(*[n - 3, 2, 1])
	else:
		k = n // 2
		if k % 2 == 0:
			print(*[k + 1, k - 1, 1])
		else:
			print(*[k + 2, k - 2, 1])


import math
t = int(input(''))
while t:
	t -= 1
	a = int(input(''))
	if a % 2 == 0:
		print(2, a - 3, 1)
	else:
		a -= 1
		f = a // 2
		s = a // 2
		while math.gcd(f, s) != 1:
			f += 1
			s -= 1
		print(f, s, 1)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
for i in range(int(input())):
	n = int(input())
	for j in range(2, n + 1):
		a = j
		b = n - j - 1
		if gcd(a, b) == 1:
			print(a, b, 1)
			break


t = int(input())
for q in range(t):
	n = int(input())
	if n % 2 == 0:
		print(2, n - 3, 1)
	else:
		k = (n - 1) // 2
		if k % 2 == 0:
			print(k - 1, k + 1, 1)
		else:
			print(k - 2, k + 2, 1)


def gcd_1(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def extended_gcd(a, b):
	(s, old_s) = (0, 1)
	(r, old_r) = (b, a)
	while r:
		q = old_r // r
		(old_r, r) = (r, old_r - q * r)
		(old_s, s) = (s, old_s - q * s)
	return (old_r, old_s, (old_r - old_s * a) // b if b else 0)
from math import gcd
t = int(input())
while t:
	num = int(input())
	first = 2
	second = num - 3
	third = 1
	while first < second and gcd_1(second, first) != 1:
		first += 1
		second -= 1
	print(first, second, third)
	t -= 1


from sys import stdin, stdout
t = int(stdin.readline())
for tt in range(t):
	n = int(stdin.readline())
	(a, b, c) = (None, None, 1)
	n -= 1
	if n % 2 != 0:
		a = 2
		b = n - a
	else:
		a = n // 2 - 1
		if a % 2 == 0:
			a -= 1
		b = n - a
	stdout.write(str(a) + ' ' + str(b) + ' ' + str(c) + '\n')


import sys
import math
import collections
import heapq
dy = [1, 0, -1, 0]
dx = [0, 1, 0, -1]
r = lambda : sys.stdin.readline().rstrip()
MIS = lambda : map(int, r().split())
for _ in range(int(r())):
	N = int(r())
	if N % 2 == 0:
		print(N // 2 - 1, N // 2, 1)
	else:
		cnt = 1
		a = N // 2
		b = N // 2
		while math.gcd(a + cnt, b - cnt) != 1:
			cnt += 1
		print(a + cnt, b - cnt, 1)


import math
T = int(input())
while T > 0:
	n = int(input())
	a = (n - 2) // 2
	b = a + 1
	c = 1
	if n % 2 == 1:
		a = a - 1
		b = b + 2
		if a % 2 == 0 and b % 2 == 0:
			a = a + 1
			b = b - 1
	print(a, b, c)
	T -= 1


def gcd(a, b):
	return a if b == 0 else gcd(b, a % b)
for t in range(int(input())):
	s = int(input())
	s -= 1
	v = 2
	while gcd(v, s - v) != 1:
		v += 1
	print(v, s - v, 1)


import math
l = int(input())
while l:
	l -= 1
	t = int(input())
	if t % 2 != 0:
		t = t - 1
		a = t // 2
		b = t // 2
		while math.gcd(b, a) != 1:
			a = a + 1
			b = b - 1
		print(a, b, 1)
	else:
		print(t - 3, 2, 1)


import sys
import math as mt
import collections as cc
I = lambda : list(map(int, input().split()))
mod = 10 ** 9 + 7

def ch(temp):
	tans = 0
	for i in range(len(temp) - k - 1, -1, -k):
		tans += 2 * abs(temp[i])
	return tans
for tc in range(int(input())):
	(n,) = I()
	if n % 2 == 0:
		print(n // 2, n // 2 - 1, 1)
	else:
		m = (n - 1) // 2
		if m % 2 == 0:
			print(m - 1, m + 1, 1)
		else:
			print(m - 2, m + 2, 1)


from math import gcd

def sol(n):
	for g in range(1, n // 3 + 1):
		if n % g != 0:
			continue
		for x in range(1, n // g + 1):
			y = n // g - x - 1
			if gcd(x, y) == 1:
				(a, b) = (x * g, y * g)
				c = n - a - b
				if a != b and b != c and (c != a):
					print(a, b, n - a - b)
					return
t = int(input())
for i in range(t):
	n = int(input())
	sol(n)


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
inp = lambda : list(map(int, sys.stdin.readline().rstrip('\r\n').split()))
for _ in range(int(input())):
	n = int(input())
	c = 1
	n -= 1
	if n % 2:
		a = n // 2
		b = n // 2 + 1
		print(a, b, c)
		continue
	if n // 2 % 2:
		a = n // 2 - 2
		b = n // 2 + 2
	else:
		a = n // 2 - 1
		b = n // 2 + 1
	print(a, b, c)


from sys import setrecursionlimit
from bisect import bisect_left, bisect_right
from collections import deque
from functools import lru_cache, reduce
from heapq import heappush, heappop
from math import sqrt, ceil, floor, log2
T = int(input())

def isPrime(n):
	for i in range(2, int(sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def rl(t=int):
	return list(map(t, input().split()))
for t in range(1, T + 1):
	n = int(input())
	comp = 7
	while True:
		if isPrime(comp):
			c = n - comp - 1
			if min(comp % c, c % comp) > 0 and c != comp:
				print(comp, n - comp - 1, 1)
				break
		comp += 1


import io, os
import math
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
MAX = 1000
prime = [0] * (MAX + 1)
for i in range(2, MAX + 1):
	if prime[i] > 1:
		continue
	for j in range(i, MAX + 1, i):
		prime[j] += 1
primelist = []
for i in range(2, MAX + 1):
	if prime[i] == 1:
		primelist.append(i)

def main(t):
	n = int(input())
	c = 1
	for p in primelist:
		if math.gcd(p, n - 1 - p) == 1:
			b = p
			a = n - 1 - p
			break
	print(a, b, c)
T = int(input())
t = 1
while t <= T:
	main(t)
	t += 1


from math import ceil
for _ in range(int(input())):
	n = int(input())
	n -= 1
	c = 1
	if n % 2 == 1:
		print(ceil(n / 2), n // 2, c)
	else:
		z = n // 2
		if z % 2:
			print(z + 2, z - 2, 1)
		else:
			print(z - 1, z + 1, 1)


from math import gcd

def checker(n, a, b, c):
	if a + b + c == n and gcd(a, b) == c:
		return 1
	return 0

def solve(n):
	(a, b, c) = (0, 0, 0)
	if n % 2 == 0:
		c = 1
		(a, b) = (n // 2, n // 2 - 1)
	else:
		c = 1
		n -= 1
		g = n // 2
		if g % 2 == 0:
			a = g - 1
			b = g + 1
		else:
			a = g - 2
			b = g + 2
	return (a, b, c)

def verify(l, r):
	(right, wrong) = (0, 0)
	wrongs = []
	for i in range(l, r):
		(a, b, c) = solve(i)
		if checker(i, a, b, c):
			right += 1
		else:
			wrongs.append([i, a, b, c])
			wrong += 1
	print(f'Range {l}- {r}, Right : {right}, Wrong {wrong} ')
	for (i, a, b, c) in wrongs:
		print(f'For {i}, a={a}, b={b}, c={c} is wrong, gcd of a,b is {gcd(a, b)} , addition : {a + b + c}')

def main():
	T = int(input())
	for t in range(T):
		n = int(input())
		print(*solve(n))
main()


from itertools import compress
from math import ceil, gcd

def half_sieve(n):
	if n <= 2:
		return []
	sieve = bytearray([True]) * (n // 2)
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i // 2]:
			sieve[i * i // 2::i] = bytearray((n - i * i - 1) // (2 * i) + 1)
	primes = list(compress(range(1, n, 2), sieve))
	primes[0] = 2
	return primes
x = half_sieve(50)
t = int(input())
for i in range(0, t):
	n = int(input())
	for j in range(n):
		a = x[j]
		b = n - a - 1
		if a >= b:
			break
		c = gcd(a, b)
		if a != c and b != c and (a + b + c == n):
			print(a, b, c)
			break


import sys
tokens = ''.join(sys.stdin.readlines()).split()[::-1]

def next():
	return tokens.pop()

def nextInt():
	return int(next())

def nextFloat():
	return float(next())

def getIntArray(n):
	return [nextInt() for _ in range(n)]

def getFloatArray(n):
	return [nextFloat() for _ in range(n)]

def getStringArray(n):
	return [next() for _ in range(n)]
testcase = True

def solve(testcase=1):

	def gcd(a, b):
		return a if b == 0 else gcd(b, a % b)
	N = nextInt()
	if N & 1:
		i = 1
		while i * 2 < N:
			for z in range(1, 10):
				j = N - i - z
				if i != j and j != z and (z != i) and (gcd(i, j) == z):
					print(i, j, z)
					return
			i += 1
		7 / 0
	else:
		print(N - 1 >> 1, N >> 1, 1)
	pass
if testcase is None:
	testcaseCount = 1
	while tokens:
		solve(testcaseCount)
		testcaseCount += 1
else:
	testcaseCount = nextInt() if testcase else 1
	for tc in range(testcaseCount):
		solve(tc + 1)
	assert not tokens


import os
import sys
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heapify, heappop, heappush, nlargest, nsmallest
from io import BytesIO, IOBase
from math import inf, sqrt
from types import GeneratorType
BUFSIZE: int = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def modInverse(a, m):
	g = gcd(a, m)
	if g != 1:
		return -1
	else:
		return power(a, m - 2, m)

def power(x, y, m):
	if y == 0:
		return 1
	p = power(x, y // 2, m) % m
	p = p * p % m
	if y % 2 == 0:
		return p
	else:
		return x * p % m

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	ans = set()
	for p in range(2, n + 1):
		if prime[p]:
			ans.add(p)
	return ans
MOD = 1000000007
INT_MAX = inf
INT_MIN = -inf

def main():
	t = int(input())
	for _ in range(t):
		temp = list(map(int, input().split()))
		n = temp[0]
		for i in range(2, n):
			a = i
			b = n - 1 - a
			if gcd(a, b) == 1:
				print(' '.join(map(str, [a, b, 1])))
				break
main()


import sys
from bisect import bisect_left as lb
from bisect import bisect_right as rb
from collections import deque
from queue import PriorityQueue as pq
from math import gcd
input_ = lambda : sys.stdin.readline().strip('\r\n')
ii = lambda : int(input_())
il = lambda : list(map(int, input_().split()))
ilf = lambda : list(map(float, input_().split()))
lii = lambda : list(map(int, list(ip())))
ip = lambda : input_()
fi = lambda : float(input_())
ap = lambda ab, bc, cd: ab[bc].append(cd)
li = lambda : list(input_())
pr = lambda x: print(x)
prinT = lambda x: print(x)
f = lambda : sys.stdout.flush()
inv = lambda x: pow(x, mod - 2, mod)
dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]
mod = 10 ** 9 + 7
mod1 = 998244353
d = {}
d['abc'] = 'acb'
for _ in range(ii()):
	n = ii()
	if n % 2 == 0:
		print(n - 3, 2, 1)
	else:
		x = (n - 1) // 2
		if x % 2 == 1:
			y = x - 2
			z = x + 2
		else:
			y = x - 1
			z = x + 1
		print(z, y, 1)


t = int(input())
for i in range(0, t):
	n = int(input())
	c = 1
	n = n - 1
	if n % 2 == 0:
		if n / 2 % 2 == 0:
			a = n / 2 - 1
			b = n / 2 + 1
		else:
			a = n / 2 - 2
			b = n / 2 + 2
	else:
		b = int(n // 2)
		a = n - b
	print(int(a), int(b), c)


kk = int(input())
for i in range(kk):
	x = int(input())
	if x % 2 == 0:
		x -= 1
		print(x // 2, x // 2 + 1, 1, sep=' ')
	else:
		x -= 1
		x = x // 2
		if x % 2 == 1:
			print(x - 2, end=' ')
			print(x + 2, end=' ')
		else:
			print(x - 1, end=' ')
			print(x + 1, end=' ')
		print(1)


import math
for _ in range(int(input())):
	n = int(input())
	c = 1
	x = 0
	for i in range(2, n):
		if math.gcd(i, n - 1) == 1:
			x = i
			break
	y = n - 1 - x
	print(x, y, 1)


tc = int(input())
list1 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973]
for j in range(tc):
	x = int(input())
	for i in range(len(list1)):
		if x - list1[i] - 1 != list1[i] and x - list1[i] - 1 != 1 and ((x - list1[i] - 1) % list1[i] != 0):
			print(list1[i], x - list1[i] - 1, 1)
			break
		else:
			continue


import atexit, io, sys, math, heapq, collections

def get_int():
	return int(sys.stdin.readline().strip())

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def write_int(a):
	sys.stdout.write(str(a) + '\n')

def write_str(a):
	sys.stdout.write(a + '\n')

def write_list(arr):
	sys.stdout.write(' '.join(map(str, arr)) + '\n')

def swap(arr, a, b):
	arr[a] ^= arr[b]
	arr[b] ^= arr[a]
	arr[a] ^= arr[b]

def int_len(a):
	return math.floor(math.log(a, 10)) + 1

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def Sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	res = []
	for i in range(2, len(prime)):
		if prime[i]:
			res.append(i)
	return res

def binarySearch(arr, l, r, x):
	if r >= l:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binarySearch(arr, l, mid - 1, x)
		else:
			return binarySearch(arr, mid + 1, r, x)
	else:
		return -1

def search(arr, x):
	return binarySearch(arr, 0, len(arr) - 1, x)

def toString(A):
	return ''.join(A)

def toArray(str):
	return str.split()

def arrSum(Arr):
	Sum = 0
	for i in range(len(Arr)):
		Sum += Arr[i]
	return Sum

def computeXOR(n):
	if n % 4 == 0:
		return n
	if n % 4 == 1:
		return 1
	if n % 4 == 2:
		return n + 1
	return 0

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
N = get_int()
while N > 0:
	n = get_int()
	if n % 2 == 0:
		print(2, n - 3, 1)
	else:
		A = n - 1
		B = A // 2
		C = B
		if B % 2 == 1:
			B -= 2
			C += 2
		else:
			B -= 1
			C += 1
		print(B, C, 1)
	N -= 1


for _ in range(int(input())):
	n = int(input())
	l = []
	if n % 2 == 0:
		l.append(n // 2)
		l.append(n // 2 - 1)
		l.append(1)
	elif (n - 3) / 2 % 2 == 1:
		l.append((n - 3) // 2)
		l.append((n + 1) // 2)
		l.append(1)
	else:
		l.append((n - 5) // 2)
		l.append((n + 3) // 2)
		l.append(1)
	print(*l)


def getint():
	return [int(i) for i in input().split()]

def get():
	return int(input())

def getstr():
	return [i for i in input().split()]

def S():
	for test in range(int(input())):
		solve()
import math
import itertools as it
import bisect
import time
import collections as ct

def lower_bound(a, x):
	l = -1
	r = len(a)
	while l + 1 != r:
		mid = l + r >> 1
		if a[mid] < x:
			l = mid
		else:
			r = mid
	return r

def upper_bound(a, x):
	l = -1
	r = len(a)
	while l + 1 != r:
		mid = l + r >> 1
		if a[mid] <= x:
			l = mid
		else:
			r = mid
	return r

def solve():
	n = get()
	gcd = math.gcd
	if n & 1 == 0:
		print(n // 2 - 1, n // 2, 1)
	elif n % 4 == 1:
		k = (n - 1) // 4
		print(2 * k - 1, 2 * k + 1, 1)
	elif n % 4 == 3:
		k = (n - 1) // 4
		print(2 * k - 1, 2 * k + 3, 1)
S()


import math
for _ in range(int(input())):
	n = int(input()) - 1
	l = 2
	while math.gcd(l, n - l) != 1:
		l += 1
	print(l, n - l, 1)


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n % 2 == 0:
		m = n - 1
		x = m // 2 + 1
		y = m // 2
		print(x, y, 1)
	else:
		z = n - 1
		s = z // 2
		if s % 2 == 0:
			print(s + 1, s - 1, 1)
		else:
			print(s - 2, s + 2, 1)


from math import gcd
t = int(input())
for _ in range(t):
	n = int(input())
	for a in range(2, 10000000):
		if gcd(a, n - a - 1) == 1:
			print(a, n - a - 1, 1)
			break


import sys
import os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
	sys.stderr = open('error.txt', 'w')
depth = 200001
mod = 1000000007
lim = mod * mod
sys.setrecursionlimit(depth)
linp = lambda : list(minp())
minp = lambda : map(int, input().split())
from math import inf, ceil, sqrt, log2, gcd
from collections import defaultdict, deque
dxy = [(1, 0), (-1, 0), (0, 1), (0, -1)]

def expo(a, b):
	if not b:
		return 1
	v = expo(a, b // 2)
	v = v * v % mod
	if b % 2:
		v = v * a % mod
	return v

def modinv(a, b):
	d = expo(b, mod - 2)
	v = a * d % mod
	return v

def checkPrime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	for i in range(3, int(sqrt(n)) + 1, 2):
		if n % i == 0:
			return False
	return True

def highestPowerof2(x):
	x |= x >> 1
	x |= x >> 2
	x |= x >> 4
	x |= x >> 8
	x |= x >> 16
	return x ^ x >> 1
p = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]

def findF(n):
	for e in p:
		if n % e:
			return e
	return -1
for _ in range(int(input())):
	n = int(input())
	v = findF(n - 1)
	print(v, n - v - 1, 1)


for i in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		h = n // 2
		print(h, h - 1, 1)
	else:
		h = n // 2
		if h % 2 != 0:
			print(h - 2, h + 2, 1)
		else:
			print(h + 1, h - 1, 1)


from math import gcd as bltin_gcd

def p(a, b):
	return bltin_gcd(a, b) == 1
a = int(input())
for i in range(a):
	s = int(input())
	for o in range(2, (s - 1) // 2):
		if p(o, s - 1 - o) == True:
			print(o, s - 1 - o, 1)
			break


tt = 1
tt = int(input())
for _ in range(tt):
	n = int(input())
	c = 1
	n -= 1
	if n % 2:
		b = 2
		a = n - 2
		print(a, b, c)
	else:
		b = n // 2
		a = b
		if b % 2:
			b += 2
			a -= 2
		else:
			b += 1
			a -= 1
		print(a, b, c)


import sys
import math
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		for i in range(4, 100):
			if math.gcd(n - i, i - 1) == 1:
				sys.stdout.write(str(n - i) + ' ' + str(i - 1) + ' 1\n')
				break
	else:
		for i in range(3, 100):
			if math.gcd(n - i, i - 1) == 1:
				sys.stdout.write(str(n - i) + ' ' + str(i - 1) + ' 1\n')
				break


from itertools import permutations as per
from math import factorial as fact
from difflib import SequenceMatcher
t = int(input())
for _ in range(t):
	n = int(input())
	m = n // 2
	if n % 2 == 0:
		print(m, m - 1, 1)
	elif m % 2 == 0:
		print(m + 1, m - 1, 1)
	else:
		print(m + 2, m - 2, 1)


import math
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
t = int(input())
for i in range(t):
	n = int(input())
	coprime = None
	for p in primes:
		if (n - 1) % p != 0:
			ans = (str(p), str(n - 1 - p), '1')
			break
	print(' '.join(ans))


import sys
import math
from itertools import accumulate

def read_string():
	return sys.stdin.readline().strip()

def read_int_arr():
	return list(map(int, sys.stdin.readline().strip().split()))

def read_ints():
	return map(int, sys.stdin.readline().strip().split())

def solve():
	n = int(input())
	if n % 2 == 0:
		print(n - 3, 2, 1)
	else:
		for a in range(n - 4, (n - 1) // 2 - 1, -2):
			if math.gcd(a, n - 1 - a) == 1:
				print(a, n - 1 - a, 1)
				return
T = int(input())
for _ in range(T):
	solve()


import sys
input = sys.stdin.readline

def iinput():
	return int(input())

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

def i0input():
	return int(input()) - 1

def linput():
	return list(input().split())

def liinput():
	return list(map(int, input().split()))

def miinput():
	return map(int, input().split())

def li0input():
	return list(map(lambda x: int(x) - 1, input().split()))

def mi0input():
	return map(lambda x: int(x) - 1, input().split())
INF = 10 ** 20
MOD = 1000000007
from math import gcd
t = iinput()
for _ in [0] * t:
	n = iinput()
	tmp = 2
	while True:
		res = gcd(n - tmp - 1, tmp)
		if res == 1:
			print(n - tmp - 1, tmp, 1)
			break
		tmp += 1


import sys
input = lambda : sys.stdin.readline().rstrip()
INF = 10 ** 19
from math import gcd

def solve():
	n = int(input())
	if n % 2 == 0:
		(a, b, c) = (n - 3, 2, 1)
	else:
		c = 1
		for b in range(3, 10 ** 9, 2):
			a = n - 1 - b
			if gcd(a, b) == c:
				return (a, b, c)
	return (a, b, c)
t = int(input())
for _ in range(t):
	print(*solve())


import sys
import math
from collections import deque, Counter
from sys import stdin
int1 = lambda x: int(x) - 1
stinput = lambda : stdin.readline()[:-1]
ii = lambda : int(stinput())
mi = lambda : map(int, stdin.readline().split())
li = lambda : list(mi())
mi1 = lambda : map(int1, stdin.readline().split())
li1 = lambda : list(mi1())
mis = lambda : map(str, stdin.readline().split())
lis = lambda : list(mis())
from collections import defaultdict
import heapq
mod = 10 ** 9 + 7
Mod = 998244353
INF = 10 ** 18
ans = 0
t = ii()
for _ in range(t):
	n = ii()
	n -= 1
	if n % 2 == 1:
		print(n // 2, (n + 1) // 2, 1)
	else:
		m = n // 2
		if m % 2 == 0:
			print(m - 1, m + 1, 1)
		else:
			print(m - 2, m + 2, 1)


from math import ceil, log2, floor, sqrt, gcd
from collections import defaultdict, deque
from bisect import bisect_left
import sys
import os.path
from itertools import permutations
sys.setrecursionlimit(200000)
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r+')
	sys.stdout = open('output.txt', 'w')

def MI():
	return map(int, input().split())
mod = 10 ** 9 + 7

def solve(testcase):
	n = int(input())
	if n % 2 == 0:
		print(n - 3, 2, 1)
	else:
		a = (n - 1) // 2
		if a % 2:
			print(a + 2, a - 2, 1)
		else:
			print(a - 1, a + 1, 1)
t = int(input())
for _ in range(t):
	solve(_ + 1)


t = int(input())
for _ in range(t):
	n = int(input())
	if n % 2 == 0:
		print(n - 3, 2, 1)
	elif n % 3 == 0:
		print(n - 4, 3, 1)
	elif (n - 1) // 2 % 2 == 0:
		print((n - 1) // 2 - 1, (n - 1) // 2 + 1, 1)
	else:
		print((n - 1) // 2 - 2, (n - 1) // 2 + 2, 1)


import sys
from math import gcd
input = sys.stdin.readline
for __ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n - 3, 2, 1)
	else:
		for i in range(3, n, 2):
			if gcd(n - 1 - i, i) == 1:
				print(n - 1 - i, i, 1)
				break


def solve(n):
	temp = n // 2
	if n % 2 == 0:
		return [temp - 1, temp, 1]
	if temp % 2 == 0:
		return [temp - 1, temp + 1, 1]
	return [temp - 2, temp + 2, 1]
t = int(input())
for _ in range(t):
	n = int(input())
	print(*solve(n))


t = int(input())
for _ in range(t):
	n = int(input())
	if n % 2 == 0 and n != 10:
		print(n // 2, n // 2 - 1, 1)
	elif n % 2 == 1:
		if (n - 1) % 4 == 0:
			print((n - 1) // 2 + 1, (n - 1) // 2 - 1, 1)
		else:
			print((n - 1) // 2 + 2, (n - 1) // 2 - 2, 1)
	else:
		print(7, 2, 1)