Little C loves number «3» very much. He loves all things about it.

Now he has a positive integer $n$. He wants to split $n$ into $3$ positive integers $a,b,c$, such that $a+b+c=n$ and none of the $3$ integers is a multiple of $3$. Help him to find a solution.


-----Input-----

A single line containing one integer $n$ ($3 \leq n \leq 10^9$) — the integer Little C has.


-----Output-----

Print $3$ positive integers $a,b,c$ in a single line, such that $a+b+c=n$ and none of them is a multiple of $3$.

It can be proved that there is at least one solution. If there are multiple solutions, print any of them.


-----Examples-----
Input
3

Output
1 1 1
Input
233
Output
77 77 79

Source: codeforces | Difficulty: EASY
Tags: Mathematics


Solutions:
n = int(input())
q = n // 3
r = n % 3
if r == 0:
	if n == 3:
		print(1, 1, 1)
	elif n == 6:
		print(2, 2, 2)
	elif q % 3 == 0:
		print(q - 2, q + 1, q + 1)
	else:
		print(q, q, q)
elif r == 1:
	if n == 4:
		print(2, 1, 1)
	elif n == 7:
		print(2, 1, 4)
	elif q % 3 == 0:
		print(q + 1, q + 1, q - 1)
	elif q % 3 == 1:
		print(q + 1, q, q)
	else:
		print(q - 1, q + 2, q)
elif n == 5:
	print(2, 2, 1)
elif n == 8:
	print(2, 2, 4)
elif q % 3 == 0:
	print(q + 2, q + 1, q - 1)
elif q % 3 == 1:
	print(q + 1, q + 1, q)
else:
	print(q + 2, q, q)


n = int(input())
(a, b, c) = (1, 1, 1)
a = n - 2
if a % 3 == 0:
	a -= 1
	b += 1
print(a, b, c)


n = int(input())
orig = n
a = n // 3
if a % 3 == 0:
	a -= 1
n -= a
b = max(n // 3, 1)
if b % 3 == 0:
	b -= 1
n -= b
c = n
if c % 3 == 0:
	if (a + 1) % 3 != 0:
		a += 1
		c -= 1
	elif (b + 1) % 3 != 0:
		b += 1
		c -= 1
	elif (a + 2) % 3 != 0:
		a += 2
		c -= 2
	else:
		b += 2
		c -= 2
assert a + b + c == orig
assert a % 3 != 0 and b % 3 != 0 and (c % 3 != 0)
print('{} {} {}'.format(a, b, c))


n = int(input())
p = n // 3
a = b = p
c = n - 2 * p
if not p % 3:
	a -= 1
	b += 1
	if not c % 3:
		c -= 1
		b += 1
	print(' '.join(map(str, [a, b, c])))
elif not c % 3:
	c -= 1
	b += 1
	if not b % 3:
		b += 1
		a -= 1
	print(' '.join(map(str, [a, b, c])))
else:
	print(' '.join(map(str, [a, b, c])))


num = int(input())
if num % 3 == 0:
	print(1, 1, num - 2)
elif num % 3 == 1:
	print(1, 1, num - 2)
elif num % 3 == 2:
	print(1, 2, num - 3)


def main():
	n = int(input())
	if n % 3 == 0 or n % 3 == 1:
		print(1, 1, n - 2)
	else:
		print(1, 2, n - 3)

def __starting_point():
	main()
__starting_point()


n = int(input())
a = int(n / 3)
hasil = [a, a]
hasil.append(n - a - a)
if a % 3 == 0:
	hasil[0] += 1
	hasil[1] -= 1
b = n - a - a
if b % 3 == 0:
	hasil[2] += 1
	hasil[1] -= 1
	if hasil[1] % 3 == 0:
		hasil[0] += 1
		hasil[1] -= 1
if n == 5:
	hasil = [2, 1, 2]
print(hasil[0], hasil[1], hasil[2])


x = int(input())
y = x // 3
if x % 3 == 0 and y % 3 == 0:
	print(y - 1, y - 1, y + 2)
elif x % 3 == 0 and y % 3 != 0:
	print(y, y, y)
if y % 3 == 0 and x % 3 != 0:
	if 3 * y + 1 == x:
		print(y - 1, y + 1, y + 1)
	else:
		print(y - 1, y + 1, y + 2)
elif y % 3 == 1 and x % 3 != 0:
	if 3 * y + 1 == x:
		print(y, y, y + 1)
	else:
		print(y, y + 1, y + 1)
elif y % 3 == 2 and x % 3 != 0:
	if 3 * y + 1 == x:
		print(y - 1, y, y + 2)
	else:
		print(y, y, y + 2)


n = int(input())
print(1, 1 if (n - 2) % 3 != 0 else 2, n - 2 if (n - 2) % 3 != 0 else n - 3)


n = int(input())
a = 1
b = 1
for i in range(n - 2, 0, -1):
	if i % 3 == 0:
		a = a + 1
		b = b + 1
	if (i % 3 != 0 and a % 3 != 0) and (b % 3 != 0 and a + b + i == n):
		print(a, b, i)
		break


import math
n = 0

def read_input():
	global n
	n = int(input())

def solve():
	a = math.floor(n / 3)
	b = a
	c = n - b - a
	if a % 3 == 0:
		a = a - 1
		b = b + 1
		if b % 3 == 0:
			b = b - 1
			c = c + 1
			if c % 3 == 0:
				a = 1
				b = 1
				c = n - 2
	if b % 3 == 0:
		b = b - 1
		a = a + 1
		if a % 3 == 0:
			a = a - 1
			c = c + 1
			if c % 3 == 0:
				a = 1
				b = 1
				c = n - 2
	if c % 3 == 0:
		c = c - 1
		a = a + 1
		if a % 3 == 0:
			a = a - 1
			b = b + 1
			if b % 3 == 0:
				a = 1
				b = 1
				c = n - 2
	return [a, b, c]
read_input()
arr = solve()
print(arr[0], arr[1], arr[2])


n = int(input())
a = n % 3
if a == 0 or a == 1:
	print('1 1', n - 2)
else:
	print('1 2', n - 3)


n = int(input())
i = 1
while i < n:
	a = i
	b = a
	c = n - a - b
	if a % 3 != 0 and b % 3 != 0 and (c % 3 != 0):
		print(a, b, c)
		break
	i += 1


from sys import stdin, stdout
readline = stdin.readline
write = stdout.write

def inp():
	return int(readline())

def arrinp():
	return [int(x) for x in readline().split()]
n = int(input())
print(1, end=' ')
n -= 1
if (n - 2) % 3 != 0:
	print(2, n - 2)
else:
	print(1, n - 1)


n = int(input())
flag = 0
i = 1
j = 1
k = n - 2
if k % 3 != 0:
	print(i, j, k)
else:
	print(i, j + 1, k - 1)


def solve(n):
	if (n - 2) % 3 != 0:
		return (1, 1, n - 2)
	if (n - 3) % 3 != 0:
		return (1, 2, n - 3)

def main():
	n = int(input())
	print(*solve(n))
main()


n = int(input())
if (n - 2) % 3 != 0:
	a = [1, 1, n - 2]
elif (n - 2) % 3 == 0:
	a = [1, 2, n - 3]
print(*a)


n = int(input(''))
a = n - n % 3
bol = a / 3
sayi1 = bol
sayi2 = bol
sayi3 = bol + n % 3
while True:
	if sayi1 % 3 == 0:
		sayi1 += 1
		sayi2 -= 1
		continue
	if sayi3 % 3 == 0:
		sayi3 -= 1
		sayi1 += 1
		continue
	break
print(int(sayi1), int(sayi2), int(sayi3))


a = int(input())
if a % 3 == 0 or a % 3 == 1:
	print(1, 1, a - 2)
elif a % 3 == 2:
	print(1, 2, a - 3)


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().rstrip().split())
inl = lambda : list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))
n = ini()
if (n - 2) % 3 != 0:
	print(1, 1, n - 2)
else:
	print(1, 2, n - 3)


n = int(input())
if n == 3:
	print(1, 1, 1)
	exit(0)
if n % 3 == 0:
	print(1, 1, n - 2)
	exit(0)
if (n - 1) % 3 == 0 or (n + 1) % 3 == 0:
	print(1, 2, n - 3)
	exit(0)
print(1, 1, n - 2)


n = int(input())
if not (n - 2) % 3:
	print(1, 2, n - 3)
else:
	print(1, 1, n - 2)


a = int(input())
print('1', [f'2 {a - 3}', f'4 {a - 5}'][(a - 3) % 3 == 0]) if a != 3 else print(1, 1, 1)


N = int(input())
print(1, (N % 3 > 1) + 1, N - 2 - (N % 3 > 1))


import sys
for line in sys.stdin:
	n = int(line.rstrip())
	a = 1
	b = 1
	c = n - a - b
	if c % 3 == 0:
		b = 2
		c -= 1
	print(a, b, c)


num = int(input())
a = 1
b = 1
c = num - 2
if c % 3 == 0:
	c = c - 1
	b = 2
ans = []
ans.append(a)
ans.append(b)
ans.append(c)
for i in ans:
	print(i, end=' ')


n = int(input())
w0 = n % 3 != 0
if w0 == True:
	print(1, 2, n - 3)
else:
	print(1, 1, n - 2)


n = int(input())
c = n // 3
if n % 3 == 0:
	if c % 3 != 0:
		print(c, c, c)
	else:
		print(c - 1, c - 1, c + 2)
elif n % 3 == 1:
	if c % 3 == 0:
		print(c - 1, c + 1, c + 1)
	elif c % 3 == 1:
		print(c, c, c + 1)
	else:
		print(c - 1, c, c + 2)
elif c % 3 == 0:
	print(c - 1, c + 1, c + 2)
elif c % 3 == 1:
	print(c, c + 1, c + 1)
else:
	print(c, c, c + 2)


n = int(input())
if n % 3 == 2:
	print('1 2 ' + str(n - 3))
else:
	print('1 1 ' + str(n - 2))


import math
a = int(input())
if a % 3 == 0:
	a = a // 3
	if a % 3 == 0:
		print(a - 1, a - 1, a + 2)
	else:
		print(a, a, a)
else:
	n = a % 3
	print(n, n, a - 2 * n)


a = int(input())
if (a - 5) % 3 == 0:
	print(1, 2, a - 3, sep=' ')
else:
	print(1, 1, a - 2, sep=' ')


import random
n = int(input())
a = random.randint(1, n - 2)
b = random.randint(1, n - a)
c = n - (a + b)
while a % 3 == 0 or b % 3 == 0 or c % 3 == 0:
	a = random.randint(1, n - 2)
	b = random.randint(1, n - a)
	c = n - (a + b)
print(a, b, c)


try:
	n = int(input())
	if (n - 2) % 3 != 0:
		a = 1
		b = 1
		c = n - 2
	else:
		a = 1
		b = 2
		c = n - 3
	print(a, b, c)
except EOFError:
	pass


n = int(input())
a = 0
b = 0
c = 0
r = []
if n % 3 == 0:
	a = 1
	b = 1
	c = n - 2
else:
	a = 1
	b = 2
	c = n - 3
r.append(str(a))
r.append(str(b))
r.append(str(c))
an = ' '.join(r)
print(an)


num = int(input())
if num % 3 == 0:
	print(1, 1, num - 2, sep=' ')
else:
	print(1, 2, num - 3, sep=' ')


from sys import stdin, stdout, exit

def sin():
	return stdin.readline().rstrip()

def listInput():
	return list(map(int, sin().split()))

def printBS(li):
	if not li:
		return
	for i in range(len(li) - 1):
		stdout.write('%d ' % li[i])
	stdout.write('%d\n' % li[-1])
n = int(sin())
if n % 3 == 0 or n % 3 == 1:
	print(1, 1, n - 2)
else:
	print(1, 2, n - 3)


n = int(input())
a1 = 1
a2 = 1
a3 = n - 2
if a3 % 3 == 0:
	a3 -= 1
	a2 += 1
print(str(a1) + ' ' + str(a2) + ' ' + str(a3))


a = int(input())
b = a - 2
if b % 3 == 0:
	print('1 2 ' + str(b - 1))
else:
	print('1 1 ' + str(b))


def myfunc_2(n):
	x = n // 2
	if x % 3 == 0:
		if n - (x + 1) >= 0 and (n - (x + 1)) % 3 != 0:
			return (x + 1, n - (x + 1))
		elif n - (x - 1) >= 0 and (n - (x - 1)) % 3 != 0:
			return (x - 1, n - (x - 1))
	elif (x + 2) % 3 != 0 and n - (x + 2) >= 0 and ((n - (x + 2)) % 3 != 0):
		return (x + 2, n - (x + 2))
	elif (x + 1) % 3 != 0 and n - (x + 1) >= 0 and ((n - (x + 1)) % 3 != 0):
		return (x + 1, n - (x + 1))
	elif x % 3 != 0 and n - x >= 0 and ((n - x) % 3 != 0):
		return (x, n - x)

def myfunc_3(n):
	x = n // 3
	if x % 3 == 0:
		first = x - 1
	else:
		first = x
	(second, third) = myfunc_2(n - first)
	print(first, second, third)
n = int(input())
myfunc_3(n)


def output(n):
	if n == 3:
		return [1, 1, 1]
	elif n % 3 == 0 or n % 3 == 1:
		return [1, 1, n - 2]
	if n % 3 == 2:
		return [1, 2, n - 3]
n = int(input())
print(' '.join((str(i) for i in output(n))))


import sys
n = int(sys.stdin.readline())
a = n // 3
if a % 3 == 0:
	a += 1
b = (n - a) // 3
if b % 3 == 0:
	b += 1
c = n - a - b
if c % 3 == 0 and a % 3 == 2:
	c += 1
	a -= 1
elif c % 3 == 0 and b % 3 == 2:
	c += 1
	b -= 1
elif c % 3 == 0 and b % 3 == 1:
	c -= 1
	b += 1
elif c % 3 == 0 and a % 3 == 1:
	c -= 1
	a += 1
print(a, b, c)


from sys import stdin
A = int(stdin.readline())
if A % 3 == 2:
	print(1, 2, A - 3)
else:
	print(1, 1, A - 2)


import sys
import math
import bisect

def main():
	n = int(input())
	if n % 3 == 0:
		print('%d %d %d' % (1, 1, n - 2))
	elif n % 3 == 1:
		print('%d %d %d' % (1, 2, n - 3))
	elif n % 3 == 2:
		print('%d %d %d' % (1, 2, n - 3))
main()


n = int(input())
i = n % 3
if i < 2:
	print(1, 1, n - 2)
else:
	print(1, 2, n - 3)


x = int(input())
if x % 3 == 0:
	first = x - 2
	second = 1
	third = 1
	print(first, second, third)
else:
	first = x - 2 if (x - 2) % 3 != 0 else x - 4
	second = int((x - first) / 2)
	third = int((x - first) / 2)
	print(first, second, third)


n = int(input())
b = []
if n % 3 == 0:
	b = [1, 1, n - 2]
	print(*b)
elif n % 3 == 1:
	b = [1, 2, n - 3]
	print(*b)
else:
	b = [1, 2, n - 3]
	print(*b)


n = int(input())
x = y = z = n // 3
z += n % 3
if n % 3 == 0 and x % 3 == 0:
	x -= 1
	y -= 1
	z += 2
elif n % 3 == 1:
	if x % 3 == 0:
		x -= 1
		y += 1
	elif z % 3 == 0:
		x -= 1
		z += 1
elif n % 3 == 2:
	if x % 3 == 0:
		x -= 1
		y += 1
	elif z % 3 == 0:
		x += 1
		z -= 1
print(x, y, z)


import random
number = int(input())
number1 = random.randint(0, number)
if number1 % 3 == 0:
	number1 += 1
number2 = random.randint(0, number - number1)
if number2 % 3 == 0:
	number2 += 1
number3 = number - number1 - number2
if number3 % 3 == 0 or number3 < 0:
	number1 = 1
	number2 = 1
	number3 = number - 2
	if number3 % 3 == 0:
		number3 -= 1
		number1 += 1
print(number1, number2, number3)


n = int(input())
t = n // 3
r = n % 3
if r == 0:
	print(1, 1, n - 2)
elif r == 1:
	print(1, 1, n - 2)
elif r == 2:
	print(1, 2, n - 3)


n = int(input())
if n == 3:
	print('1 1 1')
	exit()
if n % 2 == 0:
	if (n - 2) % 3 == 0:
		print('1 2', n - 3)
	else:
		print('1 1', n - 2)
elif (n - 2) % 3 == 0:
	print('1 2', n - 3)
else:
	print('1 1', n - 2)


n = int(input())
if (n - 2) // 3 != (n - 2) / 3:
	print(n - 2, 1, 1)
	exit()
elif (n - 3) // 3 != (n - 3) / 3:
	print(n - 3, 2, 1)
	exit()


n = int(input())
a = 1
b = 1
c = n - 2
if c % 3 == 0:
	while True:
		b += 1
		c -= 1
		if b % 3 != 0:
			if c % 3 != 0:
				print(a, b, c)
				break
else:
	print(a, b, c)


n = int(input())
for i in range(1, n):
	for j in range(1, n):
		if i % 3 != 0 and j % 3 != 0 and ((n - i - j) % 3 != 0):
			print(i, j, n - i - j)
			b = 1
			break
	if b == 1:
		break


n = int(input())
x = n % 3 or 1
print(1, x, n - x - 1)


n = int(input())
a = n % 3
x = n // 3
k = x % 3
lista = [[[-2, 1, 1], [-2, 1, 2], [-2, 2, 2]], [[0, 0, 0], [0, 0, 1], [0, 1, 1]], [[0, 0, 0], [-1, 0, 2], [0, 0, 2]]]
res = ''
for i in lista[k][a]:
	res += str(i + x) + ' '
print(res[:-1])


n = int(input())
rem = n % 3
if rem == 0:
	print(1, 1, n - 2)
if rem == 1:
	print(1, 2, n - 3)
if rem == 2:
	print(2, 2, n - 4)


def int_lst_input():
	return [int(val) for val in input().split(' ')]

def int_input():
	return int(input())

def print_lst(lst):
	print(' '.join([str(val) for val in lst]))

def solve():
	n = int_input()
	for a in range(n):
		if a % 3 != 0:
			for b in range(n):
				if b % 3 != 0:
					if (n - a - b) % 3 != 0:
						print(f'{a} {b} {n - a - b}')
						return
solve()


def sol(n):
	avg = int(n / 3)
	first = 1
	second = 1
	third = n - 2
	while third % 3 == 0 or first % 3 == 0 or second % 3 == 0:
		first += 1
		second += 1
		third -= 2
	print(first, second, third)
n = int(input())
sol(n)


a = int(input())
if a % 3 == 0:
	print(a - 2, 1, 1)
else:
	print(a - 3, 2, 1)


from sys import stdin, stdout
import cProfile, math
from collections import Counter
printHeap = str()
test = False
memory_constrained = False

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def test_print(output):
	if test:
		stdout.write(str(output) + '\n')

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

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

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result

def main():
	x = get_int()
	nos = list()
	(k, b) = (x // 3, x % 3)
	if b == 1:
		if k % 3 == 0:
			nos = [k - 1, k + 1, k + 1]
		else:
			nos = [k, 2 * k, 1]
	elif b == 2:
		if k % 3 == 0:
			nos = [k - 1, k + 1, k + 2]
		else:
			nos = [k, 2 * k, 2]
	elif k % 3 == 0:
		nos = [k - 1, k - 1, k + 2]
	else:
		nos = [k, k, k]
	display_list(nos)
cProfile.run('main()') if test else main()


n = int(input())
k = n % 3
if k == 0 or k == 1:
	print(1, 1, n - 2)
else:
	print(1, 2, n - 3)


def jujk(n):
	for i in range(1, n // 2 + 2):
		if i % 3 == 0:
			continue
		for j in range(1, n // 2 + 2 - i):
			if j % 3 == 0 or (n - i - j) % 3 == 0:
				continue
			else:
				print(i, j, n - i - j)
				return
	else:
		print(-1)
n = int(input())
jujk(n)


target = int(input())
target -= 1
if (target - 1) % 3 == 0:
	print(1, 2, target - 2)
else:
	print(1, 1, target - 1)


import math
from collections import *
import sys
from functools import reduce

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

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
DIRECTIONS = [[0, 1], [0, -1], [1, 0], [1, -1]]
NEIGHBOURS = [(i, j) for i in range(-1, 2) for j in range(-1, 2) if i != 0 or j != 0]
OrdUnicode_a = ord('a')
OrdUnicode_A = ord('A')
CAPS_ALPHABETS = {chr(i + OrdUnicode_A): i for i in range(26)}
SMOL_ALPHABETS = {chr(i + OrdUnicode_a): i for i in range(26)}
UGLYMOD = int(1000000000.0) + 7
SEXYMOD = 998244353
MAXN = int(100000.0) + 1
INFINITY = float('inf')
n = int(input())
if (n - 2) % 3 == 0:
	print(1, 2, n - 3)
else:
	print(1, 1, n - 2)


n = int(input())
if n == 3:
	print(1, 1, 1)
else:
	import math
	div_floor = math.floor(n / 3)
	div_ceil = math.ceil(n / 3)
	if div_ceil == div_floor:
		a = 2
		b = 2
		c = n - 4
		print(a, b, c)
	else:
		a = 1
		b = 2
		c = n - 3
		print(a, b, c)


import random
a = int(input())
b = 0
c = 0
d = 0
if a % 3 == 0 and a == 3:
	b = a // 3
	c = a // 3
	d = a // 3
	print(b, c, d)
else:
	while b + c + d != a:
		b = random.randint(a // 3 - 1, a // 3 + 10)
		c = random.randint(a // 3 - 2, a // 3 + 10)
		d = random.randint(a // 3 - 3, a // 3 + 10)
		if b % 3 == 0 or c % 3 == 0 or d % 3 == 0 or (not b <= c <= d):
			b = c = d = 0
	print(b, c, d)


n = int(input())
x = 2 if (n + 1) % 3 == 0 else 1
print(f'1 {x} {n - x - 1}')


s = int(input())
if s % 3 == 0:
	z = s // 3
	if z % 3 != 0:
		print(z, z, z)
	else:
		print('1', '4', s - 5)
else:
	print('1', '2', s - 3)


z = input
n = int(z())
x = n % 3 or 1
p = n - 2 * x
print(1, x, n - 1 - x)


n = int(input())
v = []
v.append(int(n / 3))
v.append(int(n / 3))
v.append(n - 2 * int(n / 3))
for i in range(3):
	if v[i] % 3 == 0:
		prox = (i + 1) % 3
		if v[prox] % 3 == 0:
			v[i] = v[i] + 1
			v[prox] = v[prox] - 1
		elif (v[prox] + 1) % 3 == 0:
			v[i] = v[i] + 1
			v[prox] = v[prox] - 1
		else:
			v[i] = v[i] - 1
			v[prox] = v[prox] + 1
print(v[0], v[1], v[2])


x = int(input())
if (x - 2) % 3 == 0:
	print(1, 2, x - 3)
else:
	print(1, 1, x - 2)


import sys

class MyReader:

	def __init__(self):
		filename = 'file.in'
		if self.isLocal():
			self.file = open(filename)
		self.str = ['']
		self.ind = 1

	def isLocal(self):
		return len(sys.argv) > 1 and sys.argv[1] == 'SCHULLZ'

	def nextString(self):
		if self.isLocal():
			return self.file.read()
		else:
			return input()

	def nextInt(self):
		return int(self.nextToken())

	def nextToken(self):
		if self.ind >= len(self.str):
			self.ind = 0
			self.str = self.nextString().split()
		self.ind += 1
		return self.str[self.ind - 1]

def Solve():
	a = -1
	try:
		a = rdr.nextInt()
	except Exception:
		return False
	if (a - 2) % 3 == 0:
		print(1, 2, a - 3)
	else:
		print(1, 1, a - 2)
	return True
rdr = MyReader()
if not rdr.isLocal():
	Solve()
else:
	while Solve():
		fgh = 1


n = int(input())
r = n % 3
(n1, n2, n3) = (0, 0, 0)
y = 0
if r != 0:
	n1 = n // 3
	if n1 % 3 == 0:
		n1 = n1 - 1
	rem = n - n1
	n2 = rem // 2
	n3 = rem - n2
	while y != 1:
		if n2 % 3 == 0 or n3 % 3 == 0:
			n2 = n2 - 1
			n3 = n3 + 1
		else:
			y = 1
else:
	r2 = n // 3
	if r2 % 3 == 0:
		n1 = n2 = r2 - 1
		n3 = r2 + 2
	else:
		(n1, n2, n3) = (r2, r2, r2)
print(n1, n2, n3)


def like_three(n):
	if n % 3 == 0:
		return (1, 1, n - 2)
	elif n % 3 == 1:
		return (1, 1, n - 2)
	return (1, 2, n - 3)
print(*like_three(int(input())))


n = int(input())
if n % 3 == 0 or n % 3 == 1:
	print('1 ' + '1 ' + str(n - 2))
else:
	print('1 ' + '2 ' + str(n - 3))


n = int(input())
a = b = 1
c = n - (a + b)
if c % 3 == 0:
	a += 1
	c -= 1
print('{} {} {}'.format(a, b, c))


x = int(input())

def find_multiple(x):
	for i in range(x):
		if not i % 3 or i == 0:
			continue
		for j in range(x - i - 1, x):
			if not j % 3 or j == 0:
				continue
			for z in range(x - i - j, x):
				if not z % 3 or z == 0:
					continue
				if i + j + z > x:
					break
				if i + j + z == x:
					return '{} {} {}'.format(i, j, z)
print(find_multiple(x))


n = int(input())
b = 1 + (n % 3 > 1)
print(1, b, n - b - 1)


def print_triplet(number):
	a = 1
	if number % 3 == 2:
		b = 2
	else:
		b = 1
	print(str(a) + ' ' + str(b) + ' ' + str(number - a - b))
print_triplet(int(input()))


number = int(input())
if number % 3 <= 1:
	print(1, 1, number - 2)
else:
	print(1, 2, number - 3)


n = int(input())
z = n // 3
c = z % 3
b = n % 3
if n % 3 == 0 and z % 3 == 0:
	print(z + 1, z + 1, z - 2)
elif n % 3 == 0 and z % 3 != 0:
	print(z, z, z)
elif n % 3 != 0 and z % 3 == 0:
	if b == 1:
		print(z + 1, z + 1, z - 1)
	if b == 2:
		print(z - 1, z + 2, z + 1)
elif n % 3 != 0 and z % 3 != 0:
	if c == 1 and b == 1:
		print(z, z, z + 1)
	if c == 1 and b == 2:
		print(z + 1, z, z + 1)
	if c == 2 and b == 1:
		print(z + 2, z, z - 1)
	if c == 2 and b == 2:
		print(z + 2, z, z)


n = int(input())
print(1, 1 + (n % 3 == 2), n - 2 - (n % 3 == 2))


g = int(input())
a = 1
if g % 3 != 0:
	b = g % 3
else:
	b = 1
print(a, b, g - b - a)


def loves3():
	n = int(input())
	for i in range(n // 2 + 1):
		if i % 3 == 0:
			continue
		for j in range(n, n // 2 - 1, -1):
			if j % 3 == 0:
				continue
			if (n - j - i) % 3 != 0 and n - j - i > 0:
				print(str(i) + ' ' + str(j) + ' ' + str(n - i - j))
				return
loves3()


n = int(input())
k = n % 3
x = -1
y = -1
z = -1
if k == 0:
	x = 1
	y = 1
	z = n - 2
else:
	x = k
	y = 1
	z = n - x - 1
print(x, y, z)


n = int(input())
rem = n % 3
div = n // 3
if rem == 0:
	if div % 3 == 0:
		print(div - 1, div - 1, div + 2)
	else:
		print(div, div, div)
elif rem == 1:
	if div % 3 == 0:
		print(div - 1, div + 1, div + 1)
	elif div % 3 == 1:
		print(div + 1, div, div)
	elif div % 3 == 2:
		print(div, div - 1, div + 2)
elif rem == 2:
	if div % 3 == 0:
		print(div - 1, div + 1, div + 2)
	elif div % 3 == 1:
		print(div, div + 1, div + 1)
	elif div % 3 == 2:
		print(div + 2, div, div)


inpVal = int(input())
divVal = inpVal // 3
modVal = inpVal % 3
divModVal = divVal % 3
if divModVal == 0:
	if (inpVal - 2 * (divVal + 1)) % 3 != 0:
		print(str(divVal + 1) + ' ' + str(divVal + 1) + ' ' + str(inpVal - 2 * (divVal + 1)))
	else:
		print(str(divVal + 2) + ' ' + str(divVal + 2) + ' ' + str(inpVal - 2 * (divVal + 2)))
elif divModVal == 1:
	if (inpVal - 2 * divVal) % 3 != 0:
		print(str(divVal) + ' ' + str(divVal) + ' ' + str(inpVal - 2 * divVal))
	else:
		print(str(divVal + 1) + ' ' + str(divVal + 1) + ' ' + str(inpVal - 2 * (divVal + 1)))
elif (inpVal - 2 * divVal) % 3 != 0:
	print(str(divVal) + ' ' + str(divVal) + ' ' + str(inpVal - 2 * divVal))
else:
	print(str(divVal - 1) + ' ' + str(divVal - 1) + ' ' + str(inpVal - 2 * (divVal - 1)))


a = int(input())
if a % 3 == 0:
	if a / 3 % 3 != 0:
		print(a // 3, a // 3, a // 3)
	else:
		print(a // 3 - 1, a // 3 - 1, a // 3 + 2)
elif a % 3 == 1:
	print(1, 1, a - 2)
else:
	print(2, 2, a - 4)


n = int(input())
if n == 3:
	print('1 1 1')
elif n % 3 == 0:
	print('2 2 {}'.format(n - 4))
else:
	print('2 1 {}'.format(n - 3))


def division(n):
	for a in range(1, n):
		for b in range(1, n):
			for cp in range(1, n):
				c = n - cp
				if a + b + c == n:
					if a % 3 > 0 and b % 3 > 0 and (c % 3 > 0):
						return '{} {} {}'.format(a, b, c)
				elif a + b + c < n:
					break
n = input()
print(division(int(n)))


def solve(n):
	for i in range(1, n):
		if i % 3 == 0:
			continue
		j = (n - i) // 2
		k = n - i - j
		if j > k:
			(j, k) = (k, j)
		if j % 3 != 0 and k % 3 != 0:
			return (i, j, k)
		j += 1
		k -= 1
		if j > 0 and k > 0 and (j % 3 != 0) and (k % 3 != 0):
			return (i, j, k)
		j += 1
		k -= 1
		if j > 0 and k > 0 and (j % 3 != 0) and (k % 3 != 0):
			return (i, j, k)
	return None
(a, b, c) = solve(int(input()))
print(a, b, c)


n = int(input())
if (n - 2) % 3:
	print('1 1 {}'.format(n - 2))
else:
	print('1 2 {}'.format(n - 3))


i = {(0, 0): [-2, 1, 1], (0, 1): [0, 0, 0], (0, 2): [0, 0, 0], (1, 0): [-1, 1, 1], (1, 1): [0, 0, 1], (1, 2): [-1, 0, 2], (2, 0): [-1, 1, 2], (2, 1): [0, 1, 1], (2, 2): [0, 0, 2]}
n = int(input())
n_3 = n // 3
l = i[n % 3, n_3 % 3]
print('{} {} {}'.format(n_3 + l[0], n_3 + l[1], n_3 + l[2]))


n = int(input())
if n % 3 != 2:
	print(1, 1, n - 2, sep=' ')
elif n % 3 == 2:
	print(1, 2, n - 3, sep=' ')


q = int(input(''))
c = q - 1
print('1', end=' ')
for i in range(1, c):
	if i % 3 != 0 and (c - i) % 3 != 0:
		print(i, c - i, end=' ')
		break


t = int(input().strip())
opt1 = [1, 2, t - 3]
opt2 = [1, 1, t - 2]
if (t - 2) % 3 == 0:
	print(1, 2, t - 3)
else:
	print(1, 1, t - 2)


N = int(input())
a = 1
b = 1
c = N - 2
if c % 3 == 0 and c >= 3:
	a += 1
	c -= 1
print(a, b, c)


x = int(input())
a = 1
b = 1
c = x - (a + b)
if c % 3 == 0:
	a += 1
	c -= 1
print(a, b, c)


n = int(input())
x = n // 3
sx = 0
if x % 3 == 0:
	sx = 1
	x += 1
y = x
if (n - (x + y)) % 3 == 0 and sx == 0:
	if (x - 1) % 3 != 0 and x > 0:
		x -= 1
	elif (x + 1) % 3 != 0:
		x += 1
	if (n - (x + y)) % 3 == 0 and (y - 1) % 3 != 0 and (y > 0):
		y += 1
	elif (n - (x + y)) % 3 == 0 and (y + 1) % 3 != 0:
		y -= 1
if (n - (x + y)) % 3 == 0 and sx == 1:
	y = y + 1
z = n - (x + y)
l = [x, y, z]
l.sort()
for i in range(len(l)):
	print(l[i], end=' ')


n = int(input())
if n == 1:
	print('1 1 1')
elif (n - 2) % 3 == 0:
	print(1, 2, n - 3, end=' ')
else:
	print(1, 1, n - 2, end=' ')


n = int(input())
if n % 3 == 0:
	print(1, 1, n - 2)
elif n % 3 == 1:
	print(1, 2, n - 3)
elif n % 3 == 2:
	print(2, 2, n - 4)


n = int(input())
m = 1
l = 1
k = n - 2
if k % 3 != 0:
	print(m, l, k)
else:
	print(m + 1, l, k - 1)


n = int(input())
if n % 3 == 1 or n % 3 == 0:
	print(1, 1, n - 2)
else:
	print(2, 2, n - 4)


import math
import sys
DEBUG = False

def inp():
	return sys.stdin.readline().rstrip()

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)

def solve(N):
	if N % 3 < 2:
		return (1, 1, N - 2)
	return (1, 2, N - 3)

def main():
	print(*solve(int(inp())))
main()


import sys
x = int(input())
y = x / 2 - 1
z = x / 2 - 2
u = x / 3
i = x - 1
m = i / 2
a = x - 2
j = x - 2
b = x - 3
if x == 3:
	print(1, 1, 1)
	sys.exit()
elif j % 3 != 0:
	print(j, 1, 1)
	sys.exit()
elif b % 3 != 0:
	print(b, 1, 2)
elif x == 5:
	print(1, 2, 2)
	sys.exit()
elif x == 7:
	print(4, 1, 2)
	sys.exit()
elif x == 8:
	print(2, 2, 4)
	sys.exit()


from sys import stdin, stdout
n = int(stdin.readline())
if (n - 2) % 3 == 0:
	stdout.write('1 2 ' + str(n - 3))
else:
	stdout.write('1 1 ' + str(n - 2))


n = int(input())
abc = [1, 1, n - 2]
if abc[2] % 3 == 0:
	abc[1] += 1
	abc[2] += -1
	print(' '.join(list(map(str, abc))))
else:
	print(' '.join(list(map(str, abc))))


n = int(input())
l = [[1, 1], [1, 1], [1, 2]]
r = l[n % 3]
r.append(n - sum(r))
print(*r)


check = int(input())
print(f'{1} {1 + ((check - 2) % 3 == 0)} {check - 2 - ((check - 2) % 3 == 0)}')


n = int(input())
q = n % 3
if q == 0:
	print(1, 1, n - 2)
if q == 1:
	print(1, 1, n - 2)
if q == 2:
	print(1, 2, n - 3)


a = int(input())
if a % 3 == 0:
	b = int(1)
	c = int(1)
	d = int(a - 2)
if a % 3 == 1:
	b = 1
	c = 1
	d = a - 2
if a % 3 == 2:
	b = 1
	c = 2
	d = a - 3
print(b, c, d)


__author__ = 'Dilshod'
n = int(input())
if (n - 2) % 3 == 0:
	print(n - 3, 2, 1)
else:
	print(n - 2, 1, 1)


from sys import stdin
n = int(stdin.readline())
x1 = 2
x2 = 5
ans = 1
if n == 3:
	print(1, 1, 1)
	exit()
elif n == 4:
	print(1, 1, 2)
	exit()
elif n == 5:
	print(1, 2, 2)
	exit()
n -= 2
while True:
	if ans % 3 != 0 and n % 3 != 0:
		break
	if ans > n or n == 0:
		break
	ans += 1
	n -= 1
print(1, ans, n)


a = int(input())
if a % 3 != 2:
	print('1 1', a - 2, sep=' ')
else:
	print('1 2', a - 3, sep=' ')


n = int(input())
print(1, end=' ')
i = 1
while True:
	if i % 3 != 0 and (n - (i + 1)) % 3 != 0:
		print(i, n - (i + 1))
		break
	else:
		i = i + 1


import math
n = int(input())
x = n // 3
d = n - x * 3
a = b = c = x
if x % 3 == 0:
	if d == 0:
		a -= 1
		b -= 1
		c += 2
	if d == 1:
		a -= 1
		b += 1
		c += 1
	if d == 2:
		a += 2
		b += 1
		c -= 1
if x % 3 == 1:
	if d == 1:
		a += 1
	if d == 2:
		a += 1
		b += 1
if x % 3 == 2:
	if d == 1:
		a -= 1
		b += 3
		c -= 1
	if d == 2:
		a += 2
print(a, b, c)


params = input().split()
number = int(params[0])
if number % 3 == 0:
	print('1 1 ' + str(number - 2))
else:
	print('2 1 ' + str(number - 3))


def Compute(n):
	k = (n - 4) / 9
	if checkForInteger(k):
		a = 3 * k + 1
		b = 3 * k + 2
		c = a
		print(int(a), int(b), int(c))
		return
	k = (n - 5) / 9
	if checkForInteger(k):
		a = 3 * k + 1
		b = 3 * k + 2
		c = b
		print(int(a), int(b), int(c))
		return
	k = (n - 3) / 9
	if checkForInteger(k):
		a = n / 3
		b = a
		c = b
		print(int(a), int(b), int(c))
		return
	k = (n - 6) / 9
	if checkForInteger(k):
		a = n / 3
		b = a
		c = b
		print(int(a), int(b), int(c))
		return
	k = (n - 6) // 9
	a = 3 * k + 1
	b = (n - a) / 2
	if checkForInteger(b) and b % 3 != 0:
		print(int(a), int(b), int(b))
		return
	c = n - 2 * a
	if c % 3 != 0:
		print(int(a), int(a), int(c))
		return
	a = 3 * k + 2
	b = (n - a) / 2
	if checkForInteger(b) and b % 3 != 0:
		print(int(a), int(b), int(b))
		return
	c = n - 2 * a
	if c % 3 != 0:
		print(int(a), int(a), int(c))
		return

def checkForInteger(x):
	stri = str(x)
	index = stri.index('.')
	test = stri[index + 1:]
	zero = 0
	for i in test:
		if i == '0':
			zero += 1
	if zero == len(test):
		return True
	else:
		return False
n = int(input())
Compute(n)


def f(n):
	(a, r) = (n // 3, n % 3)
	if a % 3 == 0:
		if r == 0:
			return [a + 1, a + 1, a - 2]
		elif r == 1:
			return [a + 4, a - 1, a - 2]
		elif r == 2:
			return [a + 2, a + 2, a - 2]
	elif r == 0:
		return [a, a, a]
	elif r == 1:
		if (a + 1) % 3 == 0:
			return [a + 2, a - 1, a]
		else:
			return [a + 1, a, a]
	elif r == 2:
		if (a + 2) % 3 == 0:
			return [a + 1, a + 1, a]
		else:
			return [a + 2, a, a]
print(' '.join([str(i) for i in f(int(input()))]))


T_ON = 0
DEBUG_ON = 0
MOD = 998244353

def solve():
	n = read_int()
	if n % 3 == 2:
		print(1, 2, n - 3)
	else:
		print(1, 1, n - 2)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
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')

def read_int():
	return int(input())

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

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

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

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


n = int(input())
a1 = 1
b1 = 1
c1 = n - b1 - a1
if c1 % 3 == 0:
	c1 = c1 - 2
	a1 = a1 + 1
	b1 = b1 + 1
print(f'{a1} {b1} {c1}')


n = int(input())
a = 1
s = n - a
b = c = s // 2
if s % 2 == 1:
	c += 1
while b % 3 == 0 or c % 3 == 0:
	b += 1
	c -= 1
print(str(a) + ' ' + str(b) + ' ' + str(c))


value = int(input())
if value == 0:
	print('0 0 0')
elif value == 1:
	print('0 0 1')
elif value == 2:
	print('0 0 2')
elif value == 3:
	print('1 1 1')
elif value == 5:
	print('1 2 2')
else:
	div = int(value / 3)
	arr = [div, div, div]
	if arr[0] + arr[1] + arr[2] != value:
		arr[0] = value - arr[1] - arr[2]
	while arr[0] % 3 == 0 or arr[1] % 3 == 0:
		arr[0] += 2
		arr[1] -= 1
		arr[2] -= 1
	print(str(int(arr[0])) + ' ' + str(int(arr[1])) + ' ' + str(int(arr[2])))


from decimal import Decimal, localcontext
import math
z = int(input())
if math.fmod(z - 2, 3) != 0:
	print(1, 1, z - 2)
elif math.fmod(z - 3, 3) != 0:
	print(1, 2, z - 3)


a = int(input())
if (a - 2) % 3 != 0:
	angka1 = a - 2
	angka2 = 1
	angka3 = 1
elif (a - 3) % 3 != 0:
	angka1 = a - 3
	angka2 = 2
	angka3 = 1
elif (a - 4) % 3 != 0:
	angka1 = a - 4
	angka2 = 2
	angka3 = 3
print(angka1, angka2, angka3)


x = int(input())
if x % 3 == 2:
	print('1 2 ' + str(x - 3))
else:
	print('1 1 ' + str(x - 2))


from sys import stdin
from math import floor

def main():
	n = int(stdin.readline())
	m = n / 3
	a = b = c = floor(m)
	aux = int(m % 1 * 10)
	if aux == 3:
		c += 1
	elif aux == 6:
		c += 2
	if a % 3 == 0:
		a += 1
		b += 1
		c -= 2
		if c % 3 == 0:
			b += 1
			c -= 1
	elif c % 3 == 0:
		b += 1
		c -= 1
		if b % 3 == 0:
			b += 1
			c -= 1
	print(a, b, c)
main()


import sys
input = sys.stdin.readline
n = int(input())
if n % 3 == 2:
	print(1, 2, n - 3)
else:
	print(1, 1, n - 2)


n = int(input())
a = 1 + (n % 3 > 1)
print(1, a, n - a - 1)


numero = int(input())
na = 0
nb = 0
nc = 0
if numero % 3 != 0:
	na = int(numero / 3) + numero % 3
	nb = int(numero / 3)
	nc = int(numero / 3)
else:
	na = int(numero / 3)
	nb = int(numero / 3)
	nc = int(numero / 3)
while na % 3 == 0 or nb % 3 == 0 or nc % 3 == 0:
	na -= 1
	nb -= 1
	nc += 2
if numero == 5:
	na = 2
	nb = 2
	nc = 1
print(str(na) + ' ' + str(nb) + ' ' + str(nc))


n = int(input())
if n == 3:
	print('1 1 1')
else:
	(a, b) = (1, 1)
	while (n - a - b) % 3 == 0 or a % 3 == 0 or b % 3 == 0:
		a += 1
		b += 1
	c = n - a - b
	print(a, b, c)


n = int(input())
if n % 2 == 1:
	print('1', end=' ')
	n = n - 1
	a = n // 2
	if a % 3 == 0:
		print(a - 1, a + 1)
	else:
		print(a, a)
else:
	a = n // 2
	y = a % 3
	if y == 0:
		print(a - 1, a - 1, 2)
	if y == 1:
		print(a - 2, a, 2)
	if y == 2:
		print(a - 1, a - 1, 2)


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(n,) = I()
if (n - 2) % 3 == 0:
	print(1, 2, n - 3)
	exit()
print(1, 1, n - 2)


n = int(input())
flag = False
for i in range(1, 3):
	if flag:
		break
	for j in range(1, 3):
		if (n - i - j) % 3 != 0:
			print(i, j, n - i - j)
			flag = True
			break


n = int(input())
a = 1
for b in [1, 2]:
	c = n - a - b
	if c % 3:
		print('%d %d %d' % (a, b, c))
		break


n = int(input())
a = [0] * 3
a[0] = 1
a[1] = 1
a[2] = n - 2
if a[-1] % 3 == 0:
	a[0] += 1
	a[-1] -= 1
print(a[0], a[1], a[2], sep=' ')


def divi(n):
	if (n - 2) % 3 != 0:
		print(1, 1, n - 2)
	else:
		print(1, 2, n - 3)
n = int(input())
divi(n)


def main():
	n = int(input())
	num1 = 1
	num2 = 1
	num3 = n - 2
	if num3 % 3 == 0:
		num1 += 1
		num3 -= 1
	print(num1, num2, num3)
main()


n = int(input())
if n % 9 == 0:
	print(n // 3 - 1, n // 3 - 1, n // 3 + 2)
elif n % 3 == 0:
	print(n // 3, n // 3, n // 3)
else:
	print(1, 2, n - 3)


a = int(input())
b = a - 1
if a == 3:
	print('1 1 1')
elif a == 4:
	print('1 1 2')
elif a == 5:
	print('1 2 2')
else:
	c = b - 2
	if c % 3 == 0:
		print('1 4 ' + str(c - 2))
	else:
		print('1 2 ' + str(c))


n = int(input())
vs = [n // 3 for i in [0, 1, 2]]
vs[2] = n - vs[1] - vs[2]
d = [0] * 3
for d[0] in range(-3, 4):
	for d[1] in range(-3, 4):
		for d[2] in range(-3, 4):
			if sum(d) + sum(vs) == n and all(((vs[i] + d[i]) % 3 != 0 and vs[i] + d[i] >= 1 for i in [0, 1, 2])):
				print(*[vs[i] + d[i] for i in [0, 1, 2]])
				exit(0)


a = int(input())
e = 2
d = a - e
l = []
if d % 3 == 0:
	e = 3
if e == 3:
	l = [1, 2, a - 3]
else:
	l = [1, 1, a - 2]
print(*l)


n = int(input())
i1 = 1
i2 = 1
i3 = n - 2
if i3 % 3 == 0:
	i2 = 2
	i3 = i3 - 1
print('{} {} {}'.format(i1, i2, i3))


def c_kocha_3(x):
	if x // 3 == x // 3 * 3:
		print(x // 3, ' ', x // 3, ' ', x // 3)
	a = 0
	b = 0
	c = 0
	a = x // 3
	if a % 3 == 0:
		if (a + 1) % 3 != 0:
			a += 1
		else:
			a -= 1
	b = a
	c = x - (a + b)
	if c % 3 == 0:
		if (a + 1) % 3 != 0:
			c -= 1
			a += 1
		else:
			c += 1
			a -= 1
	print(a, b, c)
x = int(input())
c_kocha_3(x)


n = int(input())
a = 0
b = 0
c = 0
if n == 3:
	print('1 1 1')
	raise SystemExit
if (n - 2) % 3 != 0:
	a = n - 2
	b = 1
	c = 1
elif (n - 3) % 3 != 0:
	a = n - 3
	b = 1
	c = 2
print(a, b, c)


y = int(input())
if y >= 6:
	a = y // 3
	b = y // 3
	c = y // 3 + y % 3
	if a % 3 != 0 and b % 3 != 0 and (c % 3 != 0) and (a > 0) and (b > 0) and (c > 0):
		print(a, b, c)
	else:
		a = a - 1
		if a % 3 == 0:
			a = a + 2
			c = c - 1
			print(a, b, c)
		else:
			b = b - 1
			c = c + 2
			if a % 3 != 0 and b % 3 != 0 and (c % 3 != 0) and (a > 0) and (b > 0) and (c > 0):
				print(a, b, c)
			else:
				a = a + 2
				c = c - 2
				print(a, b, c)
else:
	a = y // 3
	b = y // 3
	c = y // 3 + y % 3
	if a % 3 != 0 and b % 3 != 0 and (c % 3 != 0) and (a > 0) and (b > 0) and (c > 0):
		print(a, b, c)
	else:
		c = c - 1
		b = b + 1
		print(a, b, c)


a = int(input())
x = 0
y = 0
z = 0
if a == 3:
	x = 1
	y = 1
	z = 1
elif a % 3 == 0:
	x = a - 4
	y = 2
	z = 2
else:
	x = a - 3
	y = 2
	z = 1
print(x, y, z)


p = int(input())
if p % 3 == 0:
	if p // 3 % 3 == 0:
		print(p // 3 - 2, p // 3 + 1, p // 3 + 1, sep=' ')
	elif p // 3 % 3 == 1:
		print(p // 3, p // 3, p // 3, sep=' ')
	elif p // 3 % 3 == 2:
		print(p // 3, p // 3, p // 3, sep=' ')
elif p % 3 == 1:
	if p // 3 % 3 == 0:
		print(p // 3 - 1, p // 3 + 1, p // 3 + 1, sep=' ')
	if p // 3 % 3 == 1:
		print(p // 3, p // 3, p // 3 + 1, sep=' ')
	if p // 3 % 3 == 2:
		print(p // 3 + 2, p // 3, p // 3 - 1, sep=' ')
elif p % 3 == 2:
	if p // 3 % 3 == 0:
		print(p // 3 - 1, p // 3 + 1, p // 3 + 2, sep=' ')
	if p // 3 % 3 == 1:
		print(p // 3 + 1, p // 3 + 1, p // 3, sep=' ')
	if p // 3 % 3 == 2:
		print(p // 3 + 2, p // 3, p // 3, sep=' ')


a = int(input())
if a % 2 == 0:
	b = (a - 2) // 2
	x = 2
	if b % 3 == 0:
		y = b + 1
		z = b - 1
	else:
		y = b
		z = b
else:
	b = (a - 1) // 2
	x = 1
	if b % 3 == 0:
		y = b + 1
		z = b - 1
	else:
		y = b
		z = b
print(x, y, z)


import sys
a = int(sys.stdin.readline().strip())
if a % 3:
	print('1 2 ' + str(a - 3))
else:
	print('1 1 ' + str(a - 2))


from collections import Counter
for _ in range(1):
	n = int(input())
	if n % 3 == 0:
		print(1, 1, n - 2)
	elif n % 3 == 1:
		print(1, 1, n - 2)
	else:
		print(1, 2, n - 3)


n = int(input())
if n % 3 == 0 or n % 3 == 1:
	print(1, 1, n - 2)
elif n % 3 == 2:
	print(1, 2, n - 3)


n = int(input())
(x1, x2) = (1, 1)
x3 = n - x1 - x2
if x3 % 3 == 0:
	x2 = 2
	x3 -= 1
print(x1, x2, x3)


n = eval(input())
(a, b) = (1, 1)
c = int(n - a - b)
if c % 3 == 0:
	c = c - 1
	b = b + 1
print(a, b, c, '\n')


n = int(input())
a = 1
b = 1
c = n - 2
if c % 3 == 0:
	b = b + 1
	c = c - 1
else:
	pass
print('%d %d %d' % (a, b, c))


from sys import stdin, stdout

def main():
	a = int(input())
	for i in range(1, a):
		for j in range(1, a):
			k = a - i - j
			if i % 3 and j % 3 and k % 3:
				print(i, j, k)
				exit()
main()


import sys
import math
import itertools
import time

def get_line():
	return list(map(str, sys.stdin.readline()))

def in1():
	return int(input())
n = in1()
t1 = n % 3
if t1 == 0:
	print(1, 1, n - 2)
elif t1 == 1:
	print(1, 2, n - 3)
elif t1 == 2:
	print(2, 2, n - 4)


n = int(input())
if n == 3:
	print('1 1 1')
elif n == 4:
	print('1 1 2')
elif n % 3 == 1:
	print('1 1', str(n - 2))
elif n % 3 == 2:
	print('1 2', str(n - 3))
else:
	print('1 1', str(n - 2))


def answer():
	a = int(input())
	if a % 3:
		print(a - a % 3 - 2, a % 3, 2)
	else:
		print(a - 2, 1, 1)
answer()


def calc(n, a):
	for i in range(-2, 3):
		for j in range(-2, 3):
			for k in range(-2, 3):
				if (a[0] + i) % 3 != 0 and (a[1] + j) % 3 != 0 and ((a[2] + k) % 3 != 0) and (a[0] + i > 0) and (a[1] + j > 0) and (a[2] + k > 0) and (sum(a) + i + j + k == n):
					print(a[0] + i, a[1] + j, a[2] + k)
					return
n = int(input())
a = [n // 3, n // 3, n - 2 * (n // 3)]
calc(n, a)


x = int(input())
a = b = c = 0
if x % 3 == 0:
	a = 1
	b = 1
	c = x - (a + b)
elif x % 3 == 1:
	a = 1
	b = 1
	c = x - (a + b)
elif x % 3 == 2:
	a = 1
	b = 2
	c = x - 3
print('{} {} {}'.format(a, b, c))


import sys
import math
input = sys.stdin.readline

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

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
if (n - 2) % 3 != 0:
	print(1, 1, n - 2)
else:
	print(1, 2, n - 3)


n = int(input())
n = n - 2
x = 1
if n % 3 == 0:
	x += 1
	n -= 1
print('1', x, n)


n = int(input())
for i in range(1, 3):
	for j in range(1, 3):
		if (n - i - j) % 3 != 0:
			print(i, j, n - i - j)
			exit(0)


n = int(input())
if n // 3 % 3 != 0 and (n - 2 * (n // 3)) % 3 != 0:
	a = [n // 3, n // 3, n - 2 * (n // 3)]
elif (n // 3 + 1) % 3 != 0 and (n - 2 * (n // 3) - 2) % 3 != 0:
	a = [n // 3 + 1, n // 3 + 1, n - 2 * (n // 3) - 2]
else:
	a = [n // 3 - 1, n // 3 + 2, n - 2 * (n // 3) - 1]
a.sort()
print(a[0], a[1], a[2])


def love_3():
	number = int(input())
	if number == 3:
		print(1, 1, 1)
		return
	temp = number
	others = 0
	while True:
		temp -= 2
		others += 1
		if temp % 3 != 0:
			print(temp, others, others)
			return
love_3()


n = eval(input())
if n % 3 == 2:
	print(1, 2, n - 3)
else:
	print(1, 1, n - 2)


n = int(input())
if n % 3 == 0:
	print(str(1) + ' ' + str(1) + ' ' + str(n - 2))
	exit()
if n % 3 == 1:
	print(str(2) + ' ' + str(1) + ' ' + str(n - 3))
	exit()
if n % 3 == 2:
	print(str(2) + ' ' + str(1) + ' ' + str(n - 3))
	exit()


num = int(input())
(a, b) = (1, 1)
c = num - a - b
while a % 3 == 0 or b % 3 == 0 or c % 3 == 0:
	if a == b and a % 3 != 2:
		(b, c) = (b + 1, c - 1)
	elif a != b and a % 3 != 2:
		(a, c) = (a + 1, c - 1)
	elif a == b and a % 3 == 2:
		(a, b, c) = (a + 2, b + 2, c - 4)
print(str(a) + ' ' + str(b) + ' ' + str(c))


n = int(input())
res = [1, 1, n - 2]
if res[2] == 1:
	print(' '.join(list((str(i) for i in res))))
else:
	if res[2] % 3 == 0:
		res[0] += 1
		res[2] -= 1
	print(' '.join(list((str(i) for i in res))))


import math
import bisect
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))

def mex(arr):
	nList = set(arr)
	mex = 0
	while mex in nList:
		mex += 1
	return mex

def results(arr):
	xx = arr % 3
	if xx:
		arr = arr - xx
		temp = [xx, arr - 1, 1]
	else:
		temp = [1, 1, arr - 2]
	return temp

def main():
	t = inp()
	print(*results(t))
main()


from sys import stdin
input = lambda : stdin.readline()

def main():
	N = int(input())
	a = 1
	if (N - 2) % 3:
		(b, c) = (1, N - 2)
	else:
		(b, c) = (2, N - 3)
	print(a, b, c)
main()


n = int(input())
for a in range(1, 3):
	for b in range(1, 3):
		if (n - a - b) % 3 != 0 and n - a - b > 0:
			print(a, b, n - a - b)
			exit(0)


n = int(input())
b = n % 3
while b % 3 == 0:
	b = b + 1
print(1, b, n - b - 1)


t = int(input())
if (t - 2) % 3 != 0:
	print(1, 1, t - 2)
elif (t - 3) % 3 != 0:
	print(1, 2, t - 3)
else:
	print(2, 2, t - 4)


n = int(input())
a = 1
b = 1
c = n - 2
while c % 3 == 0:
	b += 1
	c = n - 1 - b
print(a, b, c)


from sys import exit
n = int(input())
for i in range(1, n):
	if (n - 1 - i) % 3 and (n - 1 - (n - 1 - i)) % 3:
		print(1, n - 1 - i, n - 1 - (n - i - 1))
		exit()


n = int(input())
(a, b, c) = (1, max(1, n % 3), n - 1 - max(1, n % 3))
print(a, b, c)


n = eval(input())
if n % 3 == 0:
	print('1 1 ' + str(n - 2))
else:
	print('1 2 ' + str(n - 3))


from math import *
from collections import *

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

def inp_arr():
	return list(map(int, input().split()))
n = int(input())
res = []
if (n - 2) % 3:
	res.extend([1, 1, n - 2])
else:
	res.extend([1, 2, n - 3])
print(*res)


n = int(input())
if n % 3 == 2:
	print(f'1 2 {n - 3}')
else:
	print(f'1 1 {n - 2}')


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

def ss():
	return [x for x in input()]

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

def mi():
	return map(int, input().split())
a = ii()
if a % 3 == 0:
	print(1, 1, a - 2)
else:
	print(1, 2, a - 3)


s = int(input())
a = s % 3
b = s // 3
c = b % 3
if c == 0:
	if a == 0:
		print(str(b - 1) + ' ' + str(b - 1) + ' ' + str(b + 2))
	elif a == 1:
		print(str(b - 1) + ' ' + str(b + 1) + ' ' + str(b + 1))
	else:
		print(str(b - 1) + ' ' + str(b + 1) + ' ' + str(b + 2))
elif c == 1:
	if a == 0:
		print(str(b) + ' ' + str(b) + ' ' + str(b))
	elif a == 1:
		print(str(b) + ' ' + str(b) + ' ' + str(b + 1))
	else:
		print(str(b) + ' ' + str(b + 1) + ' ' + str(b + 1))
elif a == 0:
	print(str(b) + ' ' + str(b) + ' ' + str(b))
elif a == 1:
	print(str(b) + ' ' + str(b - 1) + ' ' + str(b + 2))
else:
	print(str(b + 2) + ' ' + str(b) + ' ' + str(b))


n = int(input())
if n % 3 == 0:
	a = 1
	b = 1
	c = n - 2
elif n % 3 == 1:
	a = 1
	b = 2
	c = n - 3
else:
	a = 2
	b = 2
	c = n - 4
print(a, b, c)


n = int(input())
(w, e) = divmod(n, 3)
if e == 0 or e == 1:
	print(1, 1, n - 2)
else:
	print(1, 2, n - 3)


import sys
number = int(sys.stdin.readline())
result = [1, 1, 0]
result[2] = number - result[0] - result[1]
if result[2] % 3 == 0:
	result[1] += 1
	result[2] -= 1
print(*sorted(result))


s = int(input())
a = b = 1
c = s - 2
if c % 3 == 0:
	b = 2
	c = c - 1
print(a, b, c)


n = int(input().strip())
x = n // 3
if x % 3 != 0 and (n - 2 * x) % 3 != 0:
	print(x, x, n - 2 * x)
elif x % 3 == 0 and (n - 2 * x + 2) % 3 != 0:
	print(x - 1, x - 1, n - 2 * x + 2)
elif x % 3 == 0 and (n - 2 * x + 2) % 3 == 0:
	print(x + 1, x + 1, n - 2 * x - 2)
elif (x - 1) % 3 != 0:
	print(x, x - 1, n - 2 * x + 1)
elif (x + 1) % 3 != 0:
	print(x, x + 1, n - 2 * x - 1)


def stab(a, b):
	while a % 3 == 0 or b % 3 == 0:
		(a, b) = (a + 1, b - 1)
	return (a, b)
x = int(input())
a = x // 3
b = a
c = a + x % 3
(a, b) = stab(a, b)
(b, c) = stab(b, c)
print(a, b, c)


def getThreeNum(nNum):
	nAddNum1 = 1
	nAddNum2 = 1
	nAddNum3 = nNum - nAddNum1 - nAddNum2
	if nAddNum3 % 3 == 0:
		del nAddNum2
		nAddNum2 = 2
		nAddNum3 -= 1
	print(nAddNum1, nAddNum2, nAddNum3)
nNum = int(input())
getThreeNum(nNum)


n = int(input())
m = n % 3
x = n // 3
if m == 0:
	if x % 3 == 0:
		print(x - 1, x - 1, x + 2)
	else:
		print(x, x, x)
elif m == 1:
	if x % 3 == 0:
		print(x - 1, x + 1, x + 1)
	elif x % 3 == 1:
		print(x, x, x + 1)
	else:
		print(x - 1, x - 1, x + 3)
elif x % 3 == 0:
	print(x - 1, x + 1, x + 2)
elif x % 3 == 1:
	print(x + 1, x + 1, x)
else:
	print(x, x, x + 2)


x = eval(input())
if x % 3 == 2:
	print(x - 3, 1, 2)
else:
	print(x - 2, 1, 1)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
n = int(input())
a = 1
b = 1
c = n - 2
if c % 3 != 0:
	print(a, b, c)
else:
	print(1, 2, n - 3)


n = int(input())
if n == 5:
	a = 1
	b = 2
	c = 2
elif n % 3 == 0:
	a = n // 3
	if a % 3 == 0:
		b = a + 2
		c = a - 1
		a = a - 1
	else:
		b = a
		c = a
		a = a
else:
	a = n // 3
	ost = n % 3
	if a % 3 == 0:
		b = a + ost
		c = a + 1
		a = a - 1
	elif (a + ost) % 3 == 0:
		b = a - ost
		c = a + 2 * ost
		a = a
	else:
		b = a + ost
		c = a
		a = a
print(a, b, c)


val = int(input())
if (val - 2) % 3:
	print(1, 1, val - 2)
else:
	print(1, 2, val - 3)


import random
n = int(input())
x = 1
y = 1
z = n - 2
if z % 3 == 0:
	z = n - 3
	y = 2
print(x, y, z)


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]

def divisible_by_3(n):
	return sum([int(x) for x in str(n)]) % 3 == 0
n = read_int()
if n % 3 == 2:
	print(2, 2, n - 4)
else:
	print(1, 1, n - 2)


n = eval(input())
n -= 1
print(1, end=' ')
a = n // 2
b = n - a
if a > b:
	t = a
	a = b
	b = a
while a % 3 == 0 or b % 3 == 0:
	a += 1
	b -= 1
print(a, b)


n = int(input())
if n % 3 == 2:
	b = 2
else:
	b = 1
print(1, b, n - b - 1)


X = int(input(''))
B = 1
A = 1
C = X - 2
if C % 3 != 0:
	(print(A, end=' '), print(B, end=' '), print(C, end=''))
else:
	C = C - 1
	A = A + 1
	(print(A, end=' '), print(B, end=' '), print(C, end=''))


from sys import exit

def f(a, b, n):
	n -= a + b
	if n > 0 and n % 3 != 0:
		print(a, b, n)
		exit(0)
n = int(input())
f(1, 1, n)
f(1, 2, n)


n = int(input())
k = 2
if n == 3:
	print(1, 1, 1)
	exit()
if (n - 3) % 3 != 0:
	print(1, 2, n - 3)
else:
	while (n - k) % 3 == 0:
		k += 1
	print(1, 1, n - k)


def prog():
	n = int(input())
	if (n - 2) % 3 == 0:
		print(1, 2, n - 3)
	else:
		print(1, 1, n - 2)
prog()


x = int(input())
a = 1
b = 1
x = x - 2
if x % 3 == 0:
	x = x - 1
	b = b + 1
print(a)
print(b)
print(x)


n = int(input())

def solve(n):
	(a, b) = (1, 1)
	if (n - 2) % 3 != 0:
		return str(a) + ' ' + str(b) + ' ' + str(n - 2)
	else:
		c = 2
		while (n - c) % 3 == 0:
			if b % 3 == 0:
				continue
			else:
				c += 1
				b += 1
				n = n - c
		return str(a) + ' ' + str(b) + ' ' + str(n)
print(solve(n))


n = int(input())
if n % 3 != 2:
	list1 = [1, 1, n - 2]
	print(list1[0], end=' ')
	print(list1[1], end=' ')
	print(list1[2], end=' ')
else:
	list1 = [2, 1, n - 3]
	print(list1[0], end=' ')
	print(list1[1], end=' ')
	print(list1[2], end=' ')


a = int(input())
i = 1
j = 1
k = a - 2
if k % 3 != 0:
	print(i, j, k)
else:
	j = j + 1
	k = k - 1
	print(i, j, k)


a = int(input())
a = (1, 1, a - 2) if (a - 2) % 3 != 0 else (1, 2, a - 3)
for i in a:
	print(i)


n = int(input())
x = n // 3
a = x
while a % 3 == 0:
	a = a - 1
b = (n - a) // 2
while b % 3 == 0:
	b = b - 1
c = n - a - b
if c % 3 != 0:
	print(a, b, c)
elif c % 3 == 0:
	a1 = a - 1
	b1 = b - 1
	c = n - a1 - b1
	print(a1, b1, c)


n = int(input())
k = n
a = 1
b = 2
n -= 3
while n % 3 == 0 or b % 3 == 0:
	n -= 1
	b += 1
if k == 3:
	a = 1
	b = 1
	n = 1
print(str(a) + ' ' + str(b) + ' ' + str(n))


a = int(input())
if (a - 2) % 3 != 0:
	p = q = 1
	r = a - 2
elif (a - 2) % 3 == 0:
	p = 1
	q = 2
	r = a - 3
print(int(p), int(q), int(r))


n = int(input())
r = n % 3
if r == 0:
	print(n - 2, 1, 1)
if r == 1:
	print(n - 3, 2, 1)
if r == 2:
	print(n - 4, 2, 2)


import os
import sys
n = int(sys.stdin.readline())
if n % 3 != 2:
	sys.stdout.write('{0} {1} {2}'.format(1, 1, n - 2))
else:
	sys.stdout.write('{0} {1} {2}'.format(1, 2, n - 3))


num = [1, 1, 1]
num[2] = int(input()) - 2
rem = num[2] % 3
if rem == 0:
	num[2] -= 1
	num[1] += 1
print(*num, sep=' ')


num = input()
num = int(num)
if num % 3 != 2:
	print(1, 1, num - 2)
else:
	print(1, 2, num - 3)


n = int(input())
a = n // 3
b = n // 3
c = n // 3
c += n % 3
d1 = a % 3
d2 = c % 3
if d2 == 0 and d1 == 0:
	a += 1
	b += 1
	c -= 2
elif d2 == 0:
	if d1 == 1:
		c -= 1
		a += 1
	elif d1 == 2:
		c -= 2
		a += 2
elif d1 == 0:
	if d2 == 1:
		c += 3
		a -= 1
		b -= 2
	elif d2 == 2:
		c += 2
		a -= 1
		b -= 1
print(str(a) + ' ' + str(b) + ' ' + str(c))


import math
from decimal import *
getcontext().prec = 30
n = int(input())
if n % 3 == 0:
	print('1 1 {}'.format(n - 2))
elif n % 3 == 1:
	print('1 1 {}'.format(n - 2))
else:
	print('2 2 {}'.format(n - 4))


def isMul(x):
	s = str(x)
	summ = 0
	for i in s:
		summ += int(i)
	if summ % 3 == 0:
		return True
	else:
		return False
n = int(input())
a = 1
b = 1
c = n - 2
if not isMul(c):
	print(a)
	print(b)
	print(c)
else:
	a += 1
	c -= 1
	print(a)
	print(b)
	print(c)


ok = False
t = int(input())
a = int(t / 2)
while ok == False:
	if a % 3 == 0:
		a += 1
	b = int((t - a) / 2)
	if b % 3 == 0:
		b += 1
	c = t - (a + b)
	if c % 3 == 0:
		a += 1
		ok = False
	else:
		ok = True
print(a, b, c)


n = int(input())
n1 = 1
n2 = 1
n3 = n - 2
while 1:
	if n3 % 3 != 0:
		print(n1, ' ', n2, ' ', n3)
		break
	else:
		n1 += 1
		n2 += 1
		n3 = n3 - 2


e = int(input())
if e % 3 == 0:
	a = e // 3
	if a % 3 == 0:
		b = a - 1
		c = a - 1
		a = a + 2
	else:
		b = a
		c = a
	print('{} {} {}'.format(a, b, c))
elif e % 3 == 1:
	a = e // 3
	if a % 3 == 0:
		b = a + 1
		c = a + 1
		a = a - 1
	elif a % 3 == 1:
		b = a
		c = a + 1
	else:
		b = a - 1
		c = a + 2
	print('{} {} {}'.format(a, b, c))
elif e % 3 == 2:
	a = e // 3
	if a % 3 == 0:
		b = a + 2
		c = a + 1
		a = a - 1
	elif a % 3 == 1:
		b = a + 1
		c = a + 1
	else:
		b = a
		c = a + 2
	print('{} {} {}'.format(a, b, c))


n = int(input())
ost = n // 3 % 3
if not n % 3:
	if not ost:
		a_1 = n // 3 - 2
		a_2 = n // 3 + 1
		a_3 = n // 3 + 1
	else:
		a_1 = a_2 = a_3 = n // 3
elif n % 3 == 1:
	if not ost:
		a_1 = n // 3 - 2
		a_2 = n // 3 + 1
		a_3 = n // 3 + 2
	elif ost == 1:
		a_1 = a_2 = n // 3
		a_3 = n // 3 + 1
	else:
		a_1 = a_2 = n // 3 - 1
		a_3 = n // 3 + 3
elif not ost:
	a_1 = n // 3 - 2
	a_2 = n // 3 + 2
	a_3 = n // 3 + 2
elif ost == 1:
	a_1 = n // 3
	a_2 = a_3 = n // 3 + 1
else:
	a_1 = a_2 = n // 3
	a_3 = n // 3 + 2
print(a_1, a_2, a_3)


n = int(input())
if n % 3 == 0:
	a = 1
	b = 4
	c = n - 5
else:
	a = 1
	b = 2
	c = n - 3
if n == 3:
	print('1 1 1')
else:
	print(a, b, c, end='')


def no3(a, b, c):
	return not any(filter(lambda x: x % 3 == 0, [a, b, c]))

def solution(a, b, c, n):
	not_div = True
	add = 1
	while True:
		if no3(a, b, c):
			break
		if c % 3 == 0:
			(a, b) = (a + add, b + add)
			c -= 2 * add
			if no3(a, b, c):
				break
		if a % 3 == 0:
			(a, b) = (a - 2 * add, b - 2 * add)
			c += 4 * add
			if no3(a, b, c):
				break
	return (a, b, c)
n = int(input())
div = int(n / 3)
rest = n % 3
r = [div, div, div + rest]
r = solution(r[0], r[1], r[2], n)
print(f'{r[0]} {r[1]} {r[2]}')


import sys
n = int(input())
a = b = n // 3
c = n - 2 * b
nums = [a, b, c]
res = list(map(lambda x: x % 3, nums))
resnums = zip(res, nums)
resnums = sorted(resnums, key=lambda x: x[0])
(a, b, c) = tuple(map(lambda x: x[1], resnums))
isres = list(map(lambda x: x[0] > 0, resnums))
if sum(isres) > 2:
	print(a, ' ', b, ' ', c)
	sys.exit()
if sum(isres) > 1:
	if resnums[2][0] == 2:
		a = a - 2
		c = c + 2
	else:
		a = a - 1
		c = c + 1
	print(a, ' ', b, ' ', c)
	sys.exit()
if sum(isres) > 0:
	a = a - 1
	b = b + 1
	print(a, ' ', b, ' ', c)
	sys.exit()
if sum(isres) == 0:
	a = a - 2
	b = b + 1
	c = c + 1
	print(a, ' ', b, ' ', c)
	sys.exit()


import math, sys
from itertools import permutations

def mp():
	return list(map(int, input().split()))
debug = 0
if debug:
	file = open('input.txt', 'r')
	input = file.readline
else:
	input = sys.stdin.readline

def main():
	n = int(input())
	if n % 3 != 2:
		print(1, 1, n - 2)
	else:
		print(1, 2, n - 3)
main()


n = int(input())
print(1, end=' ')
for i in range(1, n - 1):
	if (n - i - 1) % 3 != 0 and i % 3 != 0:
		print(i, n - i - 1)
		break


n = int(input())
if n % 3 == 0:
	l = int(n / 3)
	if l % 3 != 0:
		print(l, l, l)
	else:
		print(2, 2, n - 4)
else:
	print(1, 2, n - 3)


x = int(input())
a = 1
b = 1
c = x - 2
while True:
	if a % 3 == 0 or b % 3 == 0 or c % 3 == 0:
		a += 1
		c -= 1
		continue
	if a + b + c == x:
		break
print(a, b, c)


def f(n):
	for i in range(1, 10 ** 9 + 1):
		if i % 3 != 0:
			for j in range(1, 10 ** 9 + 1):
				if j % 3 != 0:
					z = n - (i + j)
					if z % 3 != 0:
						return [i, j, z]
n = int(input())
print(*f(n))


import sys
input = sys.stdin.readline
n = int(input())
(a, b, c) = (1, 1, 1)
if (c + n - 3) % 3 == 0:
	c += n - 4
	b += 1
else:
	c += n - 3
print(a, b, c)


import sys
from math import sqrt, floor, factorial
from collections import deque, Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def solve():
	n = int(inp())
	print(*[[1, 2, n - 3], [1, 1, n - 2]][not n % 3 == 2])
solve()


n = int(input())
(div, mod) = divmod(n, 3)
ans = [div, div, div]
while mod:
	ans[mod] += 1
	mod -= 1
for i in range(len(ans) - 1):
	if ans[i] % 3 == 0:
		ans[i] -= 1
		ans[-1] += 1
if ans[-1] % 3 == 0:
	ans[0] -= 1
	ans[-1] += 1
print(' '.join([str(i) for i in ans]))


t = int(input())
if (t - 2) % 3 == 0:
	print(t - 3, 2, 1)
else:
	print(t - 2, 1, 1)


n = int(input())
if n % 3 == 0 or n % 3 == 1:
	print(1, 1, n - 2, end='')
else:
	print(1, 2, n - 3, end='')


n = int(input())
a = -1
b = -1
c = -1
temp = n // 3
rem = temp % 3
rem2 = n % 3
if n == 3:
	a = b = c = 1
elif n == 4:
	a = b = 1
	c = 2
elif n == 5:
	a = b = 2
	c = 1
elif n == 9:
	a = b = 2
	c = 5
elif n == 10:
	a = b = 4
	c = 2
elif n == 12:
	a = b = 2
	c = 8
elif rem2 == 0 and rem != 2:
	a = temp - 5
	b = temp + 1
	c = temp + 4
elif rem2 == 0 and rem == 2:
	a = temp
	b = temp
	c = temp
elif rem2 == 1 and rem == 1:
	a = temp
	b = temp
	c = temp + 1
elif rem2 == 1 and rem == 0:
	a = temp - 4
	b = temp + 1
	c = temp + 4
elif rem2 == 1 and rem == 2:
	a = temp - 1
	b = temp
	c = temp + 2
elif rem2 == 2 and rem == 0:
	a = temp - 1
	b = temp + 1
	c = temp + 2
elif rem2 == 2 and rem == 2:
	a = temp
	b = temp
	c = temp + 2
elif rem2 == 2 and rem == 1:
	a = temp - 2
	b = temp
	c = temp + 4
print(str(a) + ' ' + str(b) + ' ' + str(c) + '\n')


N = int(input())
if (N - 2) % 3 != 0:
	print(1, 1, N - 2)
elif (N - 3) % 3 != 0:
	print(1, 2, N - 3)


n = int(input())

def printlist(lst):
	buf = ''
	for i in range(len(lst) - 1):
		buf += str(lst[i]) + ' '
	buf += str(lst[-1])
	print(buf)
if n == 3:
	print('1 1 1')
elif n == 4:
	print('1 1 2')
else:
	if n % 3 == 0:
		ans = [2, 2, n - 4]
	else:
		ans = [1, 2, n - 3]
	printlist(ans)


n = int(input())
a = [n // 3] * 3
md = n % 3
mr = [int(i) % 3 for i in a]
k = 0
if mr == [0, 0, 0] and md == 1:
	a[0] += 1
	a[1] += 1
	a[2] -= 1
elif mr == [0, 0, 0] and md == 2:
	a[0] += 2
	a[1] += 1
	a[2] -= 1
elif mr == [0, 0, 0] and md == 0:
	a[0] += 1
	a[1] += 1
	a[2] -= 2
else:
	for i in range(md):
		if mr[k] == 2:
			a[k] += 2
			a[k + 1] -= 1
			mr[k] = mr[k + 1] = 1
			k += 1
		elif mr[k] == 0:
			a[k] += 1
			mr[k] = 1
		elif mr[k] == 1:
			a[k] += 1
			mr[k] = 2
			k += 1
print('%d %d %d' % (a[0], a[1], a[2]))


n = int(input())
m = n / 3
x = int(m)
y = 0
z = 0
if x % 3 == 0:
	x = x - 1
n = n - x
if n % 2:
	y = int(n / 2)
	z = int(n / 2) + 1
else:
	y = z = n / 2
if y % 3 == 0 or z % 3 == 0:
	y = y - 1
	z = z + 1
list = [x, int(y), int(z)]
list.sort()
(x, y, z) = (list[0], list[1], list[2])
print(x, ' ', y, ' ', z)


inp = int(input())
if inp % 3 == 0 or inp % 3 == 1:
	print(1, 1, inp - 2)
else:
	print(1, 2, inp - 3)


n = int(input())
if (n - 2) % 3 != 0:
	print(1, 1, n - 2, sep=' ')
else:
	print(2, 2, n - 4, sep=' ')


n = int(input())
m = n % 3 or 1
print(1, m, n - 1 - m)


N = int(input())
print(1, 1, N - 2) if N % 3 < 2 else print(1, 2, N - 3)


n = int(input())
q = n // 3
if n % 3 == 0:
	if q % 3 == 0:
		print(q + 2, q - 1, q - 1)
	elif q % 3 == 1:
		print(q, q, q)
	else:
		print(q - 1, q - 1, q + 2)
elif n % 3 == 1:
	if q % 3 == 0:
		print(q + 1, q + 1, q - 1)
	elif q % 3 == 1:
		print(q, q, q + 1)
	else:
		print(q + 2, q - 1, q)
elif q % 3 == 0:
	print(q + 2, q + 1, q - 1)
elif q % 3 == 1:
	print(q, q + 1, q + 1)
else:
	print(q + 2, q, q)


n = int(input())
if n % 9 == 0:
	print(n // 3 + 2, n // 3 - 1, n // 3 - 1)
elif n % 9 == 1:
	print(n // 3 + 1, n // 3 + 1, n // 3 - 1)
elif n % 9 == 2:
	print(n // 3 + 2, n // 3 + 2, n // 3 - 2)
elif n % 9 == 3:
	print(n // 3, n // 3, n // 3)
elif n % 9 == 4:
	print(n // 3 + 1, n // 3, n // 3)
elif n % 9 == 5:
	print(n // 3 + 1, n // 3 + 1, n // 3)
elif n % 9 == 6:
	print(n // 3, n // 3, n // 3)
elif n % 9 == 7:
	print(n // 3 + 3, n // 3 - 1, n // 3 - 1)
elif n % 9 == 8:
	print(n // 3 + 2, n // 3, n // 3)


a = int(input())
x = a // 3
if a % 3 == 0:
	if x % 3 == 0:
		i = x - 1
		j = x - 1
		k = x + 2
	else:
		i = x
		j = x
		k = x
elif (a + 2) % 3 == 0:
	if x % 3 == 0:
		i = x - 2
		j = x + 1
		k = x + 2
	elif (x + 1) % 3 == 0:
		i = x - 1
		j = x
		k = x + 2
	else:
		i = x
		j = x
		k = x + 1
elif x % 3 == 0:
	i = x - 2
	j = x + 2
	k = x + 2
elif (x + 1) % 3 == 0:
	i = x
	j = x
	k = x + 2
else:
	i = x
	j = x + 1
	k = x + 1
print(str(i) + ' ' + str(j) + ' ' + str(k))


a = int(input())
x = int(a / 3)
b = c = d = e = x
if b + b + b == a:
	if b % 3 == 0:
		c = c - 2
		d = d + 1
		e = e + 1
elif b + b + b != a:
	f = a - 3 * b
	if b % 3 == 0:
		c = c - 2
		d = d + 1
		e = e + 1
		if f == 1:
			c = c + 1
		elif f == 2:
			d = d + 1
			e = e + 1
	elif b % 3 != 0:
		if (b - 1) % 3 == 0:
			if f == 2:
				c = c + 1
				d = d + 1
			elif f == 1:
				c = c + 1
		elif b - 1 == 1:
			if f == 1:
				c = c + 2
				d = d - 1
			else:
				c = c + 3
				d = d - 1
		elif f == 2:
			c = c + 2
		elif f == 1:
			c = c - 1
			d = d + 2
print(c, d, e)


n = int(input())
k = n // 3
k1 = n % 3
z = k % 3
if k % 3 == 1:
	if k1 == 1:
		print(k, k, k + 1)
	elif k1 == 0:
		print(k, k, k)
	else:
		print(k, k + 1, k + 1)
elif k % 3 == 2:
	if k1 == 0:
		print(k, k, k)
	elif k1 == 1:
		print(k - 1, k, k + 2)
	elif k1 == 2:
		print(k, k, k + 2)
elif k1 <= 1:
	print(k - 2, k + 1, k + 1 + k1)
else:
	print(k - 1, k + 1, k + k1)


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
n = ip()
if n == 3:
	print(1, 1, 1)
else:
	x = [1, 1, n - 2]
	if x[2] % 3 == 0:
		x[1] += 1
		x[2] -= 1
	print(*x)


n = int(input())
a = n // 3
b = n // 3
c = n // 3
adj = n - (a + b + c)
if n % 3 == 0:
	if a % 3 == 0 and b % 3 == 0 and (c % 3 == 0):
		a -= 2
		b += 1
		c += 1
		print(a, b, c)
	else:
		print(a, b, c)
else:
	if adj == 1:
		if (a + 1) % 3 == 0 and (b + 1) % 3 == 0 and ((c + 1) % 3 == 0):
			b -= 1
			c = c + (adj + 1)
			print(a, b, c)
		elif a % 3 == 0 and b % 3 == 0 and (c % 3 == 0):
			a += adj
			b -= 1
			c += 1
			print(a, b, c)
		else:
			a += adj
			print(a, b, c)
	if adj == 2:
		if (a + 2) % 3 == 0 and (b + 2) % 3 == 0 and ((c + 2) % 3 == 0):
			b += 1
			c += 1
			print(a, b, c)
		elif a % 3 == 0 and b % 3 == 0 and (c % 3 == 0):
			a -= 1
			b += 1
			c += adj
			print(a, b, c)
		elif (a + 1) % 3 != 0 and (b + 1) % 3 != 0:
			a += 1
			b += 1
			print(a, b, c)
		else:
			a += adj
			print(a, b, c)


n = int(input())
a = int(1)
b = int(2)
c = n - 3
counter = int(0)
if c % 3 == 0:
	while counter == 0:
		c -= 2
		b += 2
		break
if n == 3:
	a = 1
	b = 1
	c = 1
print(a, b, c)


n = int(input())
s = 1 + n % 3
if s % 3 != 0:
	print(1, s, n - s - 1)
else:
	print(1, s - 1, n - s - 1 + 1)


def find_ans(n):
	for x in range(1, n + 1):
		if x % 3 != 0:
			num1 = x
			for y in range(1, n - num1):
				if y % 3 != 0:
					num2 = y
					if (n - num1 - num2) % 3 != 0:
						return [num1, num2, n - num1 - num2]
n = int(input())
a = find_ans(n)
print(a[0], a[1], a[2])


n = int(input())
if n == 3:
	print(' '.join(['1'] * 3))
elif (n - 2) % 3 == 0:
	print('1 2 ' + str(n - 3))
else:
	print('1 1 ' + str(n - 2))


def main():
	d = int(input())
	if d % 2 == 0:
		a = 1
		b = 1
		c = d - a - b
		if c % 3 != 0:
			print(a, b, c)
		else:
			print(a, 2, c - 1)
	else:
		a = 1
		b = 1
		c = d - a - b
		if c % 3 != 0:
			print(a, b, c)
		else:
			print(a, 2, c - 1)
main()


n = int(input())
a = n - 2
b = 1
while a % 3 == 0:
	a = a - 1
	b = b + 1
print(a, b, 1, sep=' ')


import math
import itertools
from sys import stdin
from functools import reduce
from collections import deque
from sys import setrecursionlimit
from collections import defaultdict
setrecursionlimit(10 ** 5)
input = stdin.readline

def I():
	return int(input())

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

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

def LIN(N):
	return [list(map(int, input().split())) for _ in range(N)]

def solve():
	n = I()
	if (n - 2) % 3 != 0:
		print(1, 1, n - 2)
	else:
		print(1, 2, n - 3)

def main():
	t = 1
	while t:
		t -= 1
		solve()
main()


c = int(input())
a1 = 1
a2 = 1
b = c - 2
a3 = b
if b % 3 == 0:
	a2 = a2 + 1
	a3 = b - 1
print(a1, a2, a3)


n = int(input())
if n % 3 == 0 and n % 9 == 0:
	print(n // 3 - 2, n // 3 - 2, n // 3 + 4)
elif n % 3 == 0 and n % 9 != 0:
	print(n // 3, n // 3, n // 3)
elif n % 3 == 1 and (n - n % 3) % 9 == 0:
	print(n // 3 + 4, n // 3 - 1, n // 3 - 2)
elif n % 3 == 1 and (n - n % 3) % 9 != 0:
	if (n - n % 3) % 9 == 3:
		print(n // 3, n // 3, n // 3 + 1)
	elif (n - n % 3) % 9 == 6:
		print(n // 3 - 1, n // 3 - 1, n // 3 + 3)
elif n % 3 == 2 and (n - n % 3) % 9 == 0:
	print(n // 3 - 1, n // 3 - 1, n // 3 + 4)
elif n % 3 == 2 and (n - n % 3) % 9 != 0:
	if (n - n % 3) % 9 == 3:
		print(n // 3 + 1, n // 3 + 1, n // 3)
	elif (n - n % 3) % 9 == 6:
		print(n // 3, n // 3, n // 3 + 2)


x = int(input())
t = x % 3
k = 0
if x >= 3 and x <= 9:
	if x == 4:
		print(1, 1, 2)
	if x == 3:
		print(1, 1, 1)
	if x == 6:
		print(2, 2, 2)
	if x == 5:
		print(2, 2, 1)
	if x == 7:
		print(1, 2, 4)
	if x == 8:
		print(4, 2, 2)
	if x == 9:
		print(5, 2, 2)
if x > 9:
	if t == 2:
		k = x // 3
		if k % 3 == 0:
			print(k + 4, k - 1, k - 1)
		if k % 3 == 1:
			print(k + 1, k + 1, k)
		if k % 3 == 2:
			print(k, k - 1, k + 3)
	elif t == 1:
		k = int(x // 3)
		if k % 3 == 0:
			print(k - 2, k + 1, k + 2)
		elif k % 3 == 1:
			print(k, k, k + 1)
		elif k % 3 == 2:
			print(k + 2, k - 1, k)
	elif t == 0:
		k = x // 3
		if k % 3 == 0:
			print(k - 2, k + 1, k + 1)
		if k % 3 == 1:
			print(k + 1, k + 1, k - 2)
		if k % 3 == 2:
			print(k, k, k)


import sys
from collections import defaultdict as dd
from itertools import permutations as pp
from itertools import combinations as cc
from collections import Counter as ccd
from random import randint as rd
from bisect import bisect_left as bl
import heapq
mod = 10 ** 9 + 7

def ri(flag=0):
	if flag == 0:
		return [int(i) for i in input().split()]
	else:
		return int(input())
n = ri(1)
temp = n // 3
rem = n % 3

def check(a, b, c):
	if a % 3 != 0 and b % 3 != 0 and (c % 3 != 0) and (a + b + c == n) and (a >= 0) and (b >= 0) and (c >= 0):
		return 1
	return 0
for i in range(temp - 3, temp + 3):
	for j in range(temp - 3, temp + 3):
		for k in range(temp - 3, temp + 3):
			if check(i, j, k):
				print(i, j, k)
				sys.exit(0)


def abc(n):
	a = b = c = n // 3
	remainder = n - 3 * (n // 3)
	if a % 3 == 0:
		a -= 1
		b -= 1
		c += 2
	while remainder:
		if (a + 1) % 3 != 0:
			a += 1
			remainder -= 1
		elif (b + 1) % 3 != 0:
			b += 1
			remainder -= 1
		elif (c + 1) % 3 != 0:
			c += 1
			remainder -= 1
		else:
			c += 2
			a -= 1
			remainder -= 1
	return (a, b, c)
n = int(input().rstrip())
(a, b, c) = abc(n)
print(a, b, c)


def main():
	n = int(input())
	(a, tt) = (n // 9 * 3, ((-1, -1, 2), (-1, 1, 1), (-1, 1, 2), (1, 1, 1), (1, 1, 2), (1, 2, 2), (2, 2, 2), (1, 2, 4), (2, 2, 4))[n % 9])
	print(*[a + t for t in tt])
main()


n = int(input())
f = False
for i in range(1, n + 1):
	if f:
		break
	for j in range(1, n - i):
		c = n - i - j
		if i % 3 != 0 and j % 3 != 0 and (c % 3 != 0):
			print(i, j, c)
			f = True
			break


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	if (n - 2) % 3 == 0:
		return str(1) + ' ' + str(2) + ' ' + str(n - 3)
	return str(1) + ' ' + str(1) + ' ' + str(n - 2)
print(main())


number = int(input())
a = 1
b = 1
c = number - 2
if c % 3 == 0:
	b = 2
	c = c - 1
print(a, b, c)


n = int(input())
x = max(n % 3, 1)
p = n - x - 1
print(1, x, p)


import sys
import math
n = int(input())
(a, b, c) = (1, 2, 1)
flag = False
vlag = False
if n % 3 != 0:
	for i in range(1, n):
		if i % 3 != 0:
			if n - a - b % 3 != 0:
				print(a, b, n - a - b)
				flag = True
				break
		if flag:
			break
else:
	for i in range(1, n):
		if i % 3 != 0:
			if n - a - c % 3 != 0:
				print(a, c, n - a - c)
				flag = True
				break
		if flag:
			break


n = int(input())
if n % 3 == 0 or n % 3 == 1:
	a = 1
	b = 1
	c = n - 2
elif n % 3 == 2:
	a = 2
	b = 2
	c = n - 4
print(str(a) + ' ' + str(b) + ' ' + str(c))


n = int(input())
c = 1
d = 1
n = n - (c + d)
count = 0
if n % 3 == 0:
	n = n - 1
	c += 1
print(d, c, n)


n = int(input())
if n > 4:
	if n % 3 == 0:
		print('1', end=' ')
		print(n - 2, end=' ')
		print('1')
	if n % 3 == 1:
		print(n - 2, end=' ')
		print('1', end=' ')
		print('1')
	if n % 3 == 2:
		print('2', end=' ')
		print(n - 3, end=' ')
		print('1')
if n == 3:
	print('1', end=' ')
	print('1', end=' ')
	print('1', end=' ')
if n == 4:
	print('2', end=' ')
	print('1', end=' ')
	print('1')


class Solution(object):

	def run(self):
		n = int(input())
		if n % 3 == 0:
			print(1, 1, n - 2)
		else:
			print(1, 2, n - 3)
Solution().run()


import sys

def make_indivisible(x, y, z):
	arr = sorted([int(x), int(y), int(z)])
	c = arr[0]
	b = arr[1]
	a = arr[2]
	while a % 3 == 0 or b % 3 == 0 or c % 3 == 0:
		if a % 3 == 0:
			if b > 1:
				b -= 1
				a += 1
			elif c > 1:
				c -= 1
				a += 1
			else:
				a -= 1
				b += 1
		if b % 3 == 0:
			b -= 1
			a += 1
		if c % 3 == 0:
			c -= 1
			a += 1
	return (a, b, c)

def break_down(n):
	if n % 3 == 0:
		return make_indivisible(n / 3, n / 3, n / 3)
	if (n - 1) % 3 == 0:
		n -= 1
		return make_indivisible(n / 3 + 1, n / 3, n / 3)
	if (n - 2) % 3 == 0:
		n -= 2
		return make_indivisible(n / 3 + 1, n / 3 + 1, n / 3)
while True:
	try:
		inline = input()
	except EOFError:
		sys.exit(0)
	(a, b, c) = break_down(int(inline))
	print('{0} {1} {2}'.format(a, b, c))


a = int(input())
if a % 3 == 0:
	r1 = 1
	r2 = 1
	r3 = a - 2
elif a % 3 == 1:
	x1 = 1
	x2 = 1
	x3 = a - 2
	if x3 % 3 == 0:
		r3 = a - 3
		r1 = 1
		r2 = 2
	else:
		r3 = a - 2
		r2 = 1
		r1 = 1
elif a % 3 == 2:
	y1 = 2
	y2 = 2
	y3 = a - 4
	r1 = y1
	r2 = y2
	r3 = y3
print(r1, r2, r3)


import math
n = int(input())
a = 1
b = 1
c = n - 2
if c % 3 == 0:
	b = 2
	c = n - 3
print('{} {} {}'.format(a, b, c))


from collections import deque
import math
import os
import random
import re
import sys

def main():
	t = int(input())
	if (t - 2) % 3:
		print('1 1', t - 2)
	else:
		print('1 2', t - 3)
main()


n = int(input())
r = n % 3
if r != 2:
	print(n - 2, 1, 1)
else:
	print(n - 4, 2, 2)


import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations

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

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 num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
n = nu()
x = n - 2
y = n - 3
if x % 3 != 0:
	print(1, 1, x)
else:
	print(1, 2, y)


a = int(input())
if a % 3 == 0:
	if a % 9 == 0:
		print(int(a / 3) - 2, int(a / 3) + 1, int(a / 3) + 1)
	else:
		print(int(a / 3), int(a / 3), int(a / 3))
if a % 3 == 1:
	if a // 3 % 3 == 0:
		print(a // 3 - 1, a // 3 + 1, a // 3 + 1)
	elif (a // 3 + 1) % 3 == 0:
		print(a // 3, a // 3 - 1, a // 3 + 2)
	else:
		print(a // 3, a // 3, a // 3 + 1)
if a % 3 == 2:
	if a // 3 % 3 == 0:
		print(a // 3 - 1, a // 3 + 2, a // 3 + 1)
	elif (a // 3 + 1) % 3 == 0:
		print(a // 3, a // 3, a // 3 + 2)
	else:
		print(a // 3, a // 3 + 1, a // 3 + 1)


from sys import stdin

def main():
	n = int(stdin.readline())
	ans = n // 3
	if ans * 3 == n and ans % 3 != 0:
		print(ans, ans, ans)
	elif ans * 3 == n and ans % 3 == 0:
		print(ans - 1, ans - 1, ans + 2)
	else:
		(a, b) = (ans, n % 3)
		if a % 3 != 0 and (a + b) % 3 != 0:
			print(a, a, a + b)
		elif a % 3 == 0 and (a + b) % 3 != 0:
			print(a + 1, a - 1, a + b)
		elif a % 3 == 0 and (a + b) % 3 == 0:
			print(a + 2, a - 1, a + b - 1)
		elif a % 3 != 0 and (a + b) % 3 == 0:
			if (a - 1) % 3 != 0:
				print(a - 1, a, a + b + 1)
			else:
				print(a + 1, a, a + b - 1)
main()


n = int(input())
let_a = 1
let_b = 2
let_c = n - 3
if let_c % 3 == 0:
	let_b = 1
	let_c += 1
print(let_a, let_b, let_c)


n = int(input())
li = []
for i in range(1, 4):
	if i == 3:
		if (n - 2) % 3 != 0:
			li.append(n - 2)
		else:
			li.append(n - 3)
			li[-2] = li[-2] + 1
	else:
		li.append(1)
print(*li)


import math
a = int(input())
leftover = a % 3
base = math.floor(a / 3)
if leftover == 2:
	print(2, 2, a - 4)
else:
	print(1, 1, a - 2)


import math
from collections import deque
from functools import reduce
from sys import stdin, stdout, exit

def main():
	cin = Scanner()
	n = cin.next_int() - 1
	(a, b, c) = (1, int(n / 2), math.ceil(n / 2))
	if b % 3 == 0 or c % 3 == 0:
		b -= 1
		c += 1
	print(a, b, c)

class Scanner:

	def next_int(self):
		return int(self.next_line())

	def next_float(self):
		return float(self.next_line())

	def next_line(self):
		return stdin.readline().strip()

	def next_array(self, fun=int):
		line = self.next_line().split(' ')
		return line if fun is str else list(map(fun, line))
main()


x = int(input())
t = []
if x % 3 == 0 or x % 3 == 1:
	t.append(1)
	t.append(1)
	u = x - 2
	t.append(u)
	print(*t)
else:
	t.append(2)
	t.append(1)
	u = x - 3
	t.append(u)
	print(*t)


N = int(input())
(a, b, c) = (N // 3, N // 3, N // 3)
r = N % 3
if a % 3 == 1:
	if r == 1:
		a += 1
	elif r == 2:
		a += 1
		b += 1
	print(a, b, c, sep=' ')
elif a % 3 == 2:
	if r == 1:
		a += 2
		b -= 1
	elif r == 2:
		a += 2
	print(a, b, c, sep=' ')
else:
	if r == 0:
		a -= 1
		b -= 1
		c += 2
	elif r == 1:
		a += 1
		b += 1
		c -= 1
	elif r == 2:
		a += 1
		b += 2
		c -= 1
	print(a, b, c, sep=' ')


n = int(input())
if n % 3 == 2:
	print('1 2 %d' % (n - 3))
else:
	print('1 1 %d' % (n - 2))


def go():
	n = int(input())
	a = 1
	b = 1
	c = n - 2
	while a % 3 == 0 or b % 3 == 0 or c % 3 == 0:
		if c % 3 == 0:
			c -= 1
			b += 1
		elif b % 3 == 0:
			b -= 1
			a += 1
		else:
			a -= 1
			if (c + 1) % 3 == 0:
				b += 1
			else:
				c += 1
	return '{} {} {}'.format(a, b, c)
print(go())


class CodeforcesTask1047ASolution:

	def __init__(self):
		self.result = ''
		self.n = 0

	def read_input(self):
		self.n = int(input())

	def process_task(self):
		if not self.n % 3:
			a = 1
			b = 1
			c = self.n - 2
		else:
			a = 1
			b = 2
			c = self.n - 3
		self.result = f'{a} {b} {c}'

	def get_result(self):
		return self.result
Solution = CodeforcesTask1047ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


a = int(input())
if a % 3 == 0 or a % 3 == 1:
	print(a - 2, 1, 1, sep=' ')
else:
	print(a - 3, 2, 1, sep=' ')


def solve(n):
	for i in range(1, n + 1):
		for j in range(i, n + 1):
			if i + j > n:
				break
			c = n - (i + j)
			if i + j + c == n and i % 3 != 0 and (j % 3 != 0) and (c % 3 != 0) and (c > 0):
				return (i, j, n - (i + j))

def main():
	n = int(input())
	print(*solve(n))
main()


a = int(input())
if a % 3 == 0 and a % 9 != 0:
	p = q = r = a / 3
elif a % 3 == 0 and a % 9 == 0:
	p = a / 3 + 2
	q = a / 3 - 1
	r = a / 3 - 1
elif a % 3 == 1 and (a - 1) % 9 != 0:
	p = (a - 1) / 3
	x = p % 3
	if x == 0:
		q = p + 2
		r = p - 1
	elif x == 1:
		q = p + 1
		r = p
	elif x == 2:
		q = p + 2
		r = p - 1
elif a % 3 == 1 and (a - 1) % 9 == 0:
	p = (a - 1) / 3 + 2
	q = (a - 1) / 3 + 1
	r = (a - 1) / 3 - 2
elif a % 3 == 2 and (a - 2) % 9 != 0:
	p = (a - 2) / 3
	if p % 3 == 1:
		r = p + 1
		q = p + 1
	else:
		q = p + 3
		r = p - 1
elif a % 3 == 2 and (a - 2) % 9 == 0:
	p = (a - 2) / 3 + 2
	q = (a - 2) / 3 + 1
	r = (a - 2) / 3 - 1
print(int(p), int(q), int(r))


def main():
	n = int(input())
	if n % 3 == 2:
		print(1, 2, n - 3)
	else:
		print(1, 1, n - 2)
main()


from itertools import combinations
n = int(input())
if n <= 10:
	lis = list(range(1, n)) + list(range(1, n)) + list(range(1, n))
else:
	lis = list(range(n - 5, n)) + [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10]
for (x, y, z) in list(combinations(lis, 3)):
	if x + y + z == n and x % 3 != 0 and (y % 3 != 0) and (z % 3 != 0):
		print(x, ' ', y, ' ', z)
		break


from collections import Counter
gi = lambda : list(map(int, input().strip().split()))
(n,) = gi()
a = 1
n -= 1
b = n // 2
c = n - b
while b % 3 == 0 or c % 3 == 0:
	(b, c) = (b - 1, c + 1)
print(a, b, c)


def q(a, A):
	while a % 3 and (A - 2 * a) % 3:
		print(a, a, A - 2 * a)
		break
	else:
		return q(a + 1, A)
w = int(input())
q(w // 3, w) if w != 7 else print(1, 1, 5)


x = eval(input())
a = x // 3
b = x // 3
c = x - a - b
if a % 3 == 0 and b % 3 == 0:
	a -= 1
	b -= 1
	c += 2
if a % 3 == 0 and c % 3 == 0:
	a -= 1
	c -= 1
	b += 2
if b % 3 == 0 and c % 3 == 0:
	b -= 1
	c -= 1
	a += 2
if a % 3 == 0 and b % 3 == 1:
	a -= 1
	b += 1
if a % 3 == 0 and b % 3 == 2:
	a += 1
	b -= 1
if a % 3 == 0 and c % 3 == 1:
	a -= 1
	c += 1
if a % 3 == 0 and c % 3 == 2:
	a += 1
	c -= 1
if c % 3 == 0 and b % 3 == 1:
	c -= 1
	b += 1
if c % 3 == 0 and b % 3 == 2:
	c += 1
	b -= 1
if c % 3 == 0 and a % 3 == 1:
	c -= 1
	a += 1
if c % 3 == 0 and a % 3 == 2:
	c += 1
	a -= 1
if b % 3 == 0 and a % 3 == 1:
	b -= 1
	a += 1
if b % 3 == 0 and a % 3 == 2:
	b += 1
	b -= 1
if b % 3 == 0 and c % 3 == 1:
	b -= 1
	c += 1
if b % 3 == 0 and c % 3 == 2:
	b += 1
	c -= 1
print(a, b, c)


x = int(input())
if (x - 2) % 3 != 0:
	print(1, 1, x - 2)
elif (x - 3) % 3 != 0:
	print(1, 2, x - 3)


def mod3(nums):
	for i in nums:
		if i % 3 == 0:
			return True
	return False
n = int(input())
nums = [n - 2, 1, 1]
while mod3(nums):
	nums = sorted(nums, reverse=True)
	nums[0] -= 1
	nums[2] += 1
print('%i %i %i' % (nums[0], nums[1], nums[2]))


def f(n):
	if n % 3 in [0, 1]:
		ans = [1, 1, n - 2]
	else:
		ans = [1, 2, n - 3]
	return ans
n = int(input())
print(*f(n))


a = int(input())
for i in range(1, a - 1):
	for j in range(1, a - i):
		if i % 3 != 0 and j % 3 != 0 and ((a - i - j) % 3 != 0):
			print(i, j, a - i - j)
			exit()


f = lambda : map(int, input().split())
n = int(input())
print(['1 ' + '1 ' + str(n - 2), '1 ' + '2 ' + str(n - 3)][n % 3 != 0])


n = []
a = int(input())
if a % 3 == 0:
	n = [1, 1, a - 2]
else:
	n = [1, 2, a - 3]
x = ' '.join((str(x) for x in n))
print(x)


n = int(input())
if n == 3:
	print(1, 1, 1)
	exit()
if n == 4:
	print(2, 1, 1)
	exit()
if n == 5:
	print(2, 2, 1)
	exit()
if n == 6:
	print(2, 2, 2)
	exit()
if (n - 2) % 3 == 0:
	print(n - 3, 2, 1)
else:
	print(n - 2, 1, 1)


def main():
	n = int(input())
	first_value = 1
	second_value = 1
	third_value = n - first_value - second_value
	while third_value % 3 == 0 or second_value % 3 == 0:
		second_value = second_value + 1
		third_value = third_value - 1
	print(str(first_value) + ' ' + str(second_value) + ' ' + str(third_value))
	return
main()


from sys import stdin, stdout
from collections import *
from math import ceil, floor, log, gcd
st = lambda : list(stdin.readline().strip())
li = lambda : list(map(int, stdin.readline().split()))
mp = lambda : map(int, stdin.readline().split())
inp = lambda : int(stdin.readline())
pr = lambda n: stdout.write(str(n) + '\n')
mod = 1000000007
INF = float('inf')

def solve():
	n = inp()
	(a, b) = (1, 1)
	n -= 2
	if n % 3 == 0:
		a += 1
		n -= 1
	print(a, b, n)
for _ in range(1):
	solve()


import math
import os
import random
import re
import sys
n = int(input())
if n % 3 == 0:
	print(n - 2, 1, 1)
elif n % 3 == 1:
	print(n - 2, 1, 1)
else:
	print(n - 3, 2, 1)


s = int(input())
result = ''
x = s // 3
y = s % 3
if x % 3 == 0:
	if y == 0:
		result = str(x - 1) + ' ' + str(x - 1) + ' ' + str(x + 2)
	elif y == 1:
		result = str(x - 1) + ' ' + str(x + 1) + ' ' + str(x + 1)
	else:
		result = str(x - 1) + ' ' + str(x + 1) + ' ' + str(x + 2)
elif x % 3 == 1:
	if y == 0:
		result = str(x) + ' ' + str(x) + ' ' + str(x)
	elif y == 1:
		result = str(x) + ' ' + str(x) + ' ' + str(x + 1)
	else:
		result = str(x) + ' ' + str(x + 1) + ' ' + str(x + 1)
elif x % 3 == 2:
	if y == 0:
		result = str(x) + ' ' + str(x) + ' ' + str(x)
	elif y == 1:
		result = str(x - 1) + ' ' + str(x) + ' ' + str(x + 2)
	else:
		result = str(x) + ' ' + str(x) + ' ' + str(x + 2)
print(result)


n = int(input())
if n == 3:
	print(1, 1, 1)
else:
	A = 1
	B = 1
	C = n - (A + B)
	if C % 3 == 0:
		C = C - 1
		B += 1
	print(A, B, C)


def sum_of_digits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n = n // 10
	return ans
n = int(input())
(a, b, c) = (1, 1, n - 2)
if sum_of_digits(c) % 3 == 0:
	(b, c) = (2, n - 3)
print(a, b, c)


def mi():
	return map(int, input().split())
n = int(input())
ans = [0] * 3
if n % 2:
	ans[2] = 1
	ans[0] = n // 2
	ans[1] = n // 2
	if ans[0] % 3 == 0:
		ans[0] -= 1
		ans[1] += 1
else:
	ans[2] = 2
	ans[1] = 2
	ans[0] = n - ans[2] - ans[1]
	if ans[0] <= 0:
		ans[1] = ans[0] = 1
	if ans[0] % 3 == 0:
		ans[0] += 1
		ans[1] -= 1
print(*ans)


n = int(input())
n -= 1
x = n // 2
y = n - x
while x % 3 == 0 or y % 3 == 0:
	x -= 1
	y += 1
print(1, x, y)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	if n % 3 != 0:
		return '1 2 {}'.format(n - 3)
	return '1 1 {}'.format(n - 2)
print(main())


n = int(input())
k = n - 2
a = 1
while k % 3 == 0:
	k -= 1
	a += 1
print(a, 1, k)


from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from collections import defaultdict
import math
from fractions import Fraction as frac
from random import random
cin = stdin.readline

def cout(x):
	stdout.write(str(x) + '\n')

def var(type=int):
	return type(stdin.readline())

def readline(type=int):
	return map(type, stdin.readline().split())

def readlist(type=int):
	return list(map(type, stdin.readline().split()))

def sorted_indexes(arr):
	return sorted(range(len(arr)), key=arr.__getitem__)

def printr(arr):
	[stdout.write(str(x) + ' ') for x in arr]
	cout('')

def find_lt(a, x):
	i = bisect_left(a, x)
	if i:
		return a[i - 1]
	raise ValueError

def find_gt(a, x):
	i = bisect_right(a, x)
	if i != len(a):
		return a[i]
	raise ValueError

def dist(x, y):
	return math.sqrt(x * x + y * y)

def binary_search(arr, x):
	i = bisect_left(arr, x)
	if i == len(arr) or arr[i] != x:
		return -1
	return i
MOD2 = 998244353
n = var()
x = n // 3
y = x
z = x
rem = n % 3
if x % 3 == 0:
	if rem == 0:
		x += 2
		y -= 1
		z -= 1
	else:
		x += 1
		y -= 1
		z += rem
else:
	if rem == 1:
		if (x + 1) % 3 == 0:
			x -= 1
			y += 2
		else:
			x += 1
	if rem == 2:
		if (x + 1) % 3 == 0:
			x += 2
		else:
			x += 1
			y += 1
print(x, y, z)


read_numbers = lambda : list(map(int, input().split()))
INF = 1 << 64
n = int(input())
for i in range(1, 3):
	for j in range(1, 3):
		m = n - i - j
		if m % 3 != 0:
			print(i, j, m)
			exit(0)


import math
n = int(input())
a1 = math.floor(n / 3)
a2 = math.ceil(n / 3)
a3 = n // 3
if a1 + a2 + a3 < n:
	a2 += 1
if a1 % 3 == 0:
	a1 -= 1
	a2 += 1
	if a2 % 3 == 0:
		a2 += 1
		a3 -= 1
		if a3 % 3 == 0:
			a2 += 1
			a3 -= 1
if a2 % 3 == 0:
	a2 -= 1
	a1 += 1
	if a1 % 3 == 0:
		a1 += 1
		a3 -= 1
		if a3 % 3 == 0:
			a1 += 1
			a3 -= 1
if a3 % 3 == 0:
	a3 -= 1
	a2 += 1
	if a2 % 3 == 0:
		a2 += 1
		a1 -= 1
		if a1 % 3 == 0:
			a2 += 1
			a1 -= 1
print(str(a1) + ' ' + str(a2) + ' ' + str(a3))


n = int(input())
flag = 0
for i in range(1, n):
	if i % 3 == 0:
		continue
	for j in range(i, n - i):
		if j % 3 == 0:
			continue
		if i % 3 != 0 and j % 3 != 0 and ((n - i - j) % 3 != 0):
			print(i, j, n - i - j)
			flag = 1
		if flag == 1:
			break
	if flag == 1:
		break


n = int(input())
if n > 10:
	if n % 3 == 0:
		n1 = 2
		n2 = 8
		n3 = n - 10
		print('%d %d %d' % (n1, n2, n3))
	else:
		n1 = 2
		n2 = 7
		n3 = n - 9
		print('%d %d %d' % (n1, n2, n3))
elif (n - 2) % 3 == 0:
	n1 = 1
	n2 = 2
	n3 = n - 3
	print('%d %d %d' % (n1, n2, n3))
else:
	n1 = 1
	n2 = 1
	n3 = n - 2
	print('%d %d %d' % (n1, n2, n3))


n = int(input())
if n % 3 == 0:
	print(f'1 1 {n - 2}')
elif n % 3 == 1:
	print(f'1 1 {n - 2}')
else:
	print(f'1 2 {n - 3}')


n = int(input())
r = n % 3
k = n // 3
if r == 0:
	r1 = k % 3
	if r1 != 0:
		print(k, k, k)
	else:
		print(k - 2, k + 1, k + 1)
elif r == 1:
	r1 = k % 3
	if r1 == 1:
		print(k, k, k + 1)
	elif r1 == 2:
		print(k, k + 2, k - 1)
	else:
		print(k + 1, k + 1, k - 1)
elif r == 2:
	r1 = k % 3
	if r1 == 1:
		print(k, k + 1, k + 1)
	elif r1 == 2:
		print(k, k, k + 2)
	else:
		print(k + 2, k + 1, k - 1)


n = int(input())
if n % 3 == 0 and n // 3 % 3 != 0:
	print(n // 3, n // 3, n // 3)
	exit()
a = []
c = 0
a.append(n // 3)
a.append(n // 3)
a.append(n - (a[0] + a[1]))
for i in range(3):
	if a[i] % 3 == 0:
		a[i] -= 1
		c += 1
i = 0
while c != 0:
	if (a[i] + c) % 3 != 0:
		a[i] += c
		c = 0
		break
	else:
		a[i] += c - 2
		c = 2
		i += 1
		if i == 2:
			i = 0
print(a[0], a[1], a[2])


def f(m):
	for i in range(1, n + 1):
		for j in range(1, n - i):
			if i % 3 != 0 and j % 3 != 0 and ((n - i - j) % 3 != 0):
				return (i, j, n - i - j)
n = eval(input())
nums = f(n)
print('{} {} {}'.format(nums[0], nums[1], nums[2]), end='')


t = int(input())
r = t % 3
(a, b, c) = [t // 3] * 3
if a % 3 != 0 and r == 0:
	print(a, b, c)
elif r == 0 and a % 3 == 0:
	a -= 2
	b += 1
	c += 1
	print(a, b, c)
elif r == 2:
	if a % 3 == 0:
		a += 2
		b += 1
		c -= 1
	else:
		rem = a % 3
		if rem == 2:
			a += r
		else:
			a += 1
			b += 1
	print(a, b, c)
else:
	if a % 3 == 0:
		a += 1
		b += 1
		c -= 1
	else:
		rem = a % 3
		if rem == 1:
			a += 1
		else:
			a += 2
			b -= 1
	print(a, b, c)