Type: FileIO (three) 1000ms 256MiB

三位数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

Special for beginners, ^_^

Description

现有3个不同的数字 a,b,c1a<b<c9a, b, c(1 \leq a < b < c \leq 9),它们可以组成6个不同的三位数数字。

已知这6个三位数数字的和是 nn,若有解,输出 a,b,ca,b,c(注意顺序),否则输出No Answer

Format

Input(three.in)

three.in

QQ次询问,每次询问相互独立。

第一行为一个整数 QQ

接下来每组数据输入一个整数 nn

Output(three.out)

three.out

第一行输出一个整数 -1。

每次询问输出 a,b,ca,b,c 的答案,若无解输出No Answer

Samples

2
1332
1333
-1
1 2 3
No Answer

Limitation

1Q1051 \leq Q \leq 10^5

1n23111 \leq n \leq 2^{31}-1

1a<b<c91 \leq a < b < c \leq 9

three.in three.out

信念

Not Attended
Status
Done
Rule
Ledo
Problem
6
Start at
2023-1-2 21:15
End at
2023-12-31 23:15
Duration
8714 hour(s)
Host
Partic.
14