Rikka with Subsequence
题号:NC213951
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
Special Judge, 64bit IO Format: %lld

题目描述

As we all know, Rikka is not good at math. Yuta, her boyfriend, is worried about it. Therefore, he sets an interesting math problem For Rikka to practice.
Given a non-negative integer x, Rikka is required to find three non-negative integers a,b,c that satisfy the following three conditions:
  1. a + b = x;
  2. is a subsequence of ;
  3. is a subsequence of .
represents the decimal string representation of integer d. For example, "0", "103".
String is a subsequence of string if and only if there exists an index sequence satisfying .
To avoid the case of no solution, Yuta assumes there is a special choice "-" for c where is equal to the empty string. Under this assumption, a=0, b=9, c=- becomes a valid solution of x=9.
Finding a valid solution is an easy task even for Rikka. Therefore, Rikka wants to increase the difficulty: Rikka wants you to find a valid solution (a,b,c) so that the length of is as large as possible.

输入描述:

The first line contains a single integer , representing the number of test cases.
For each test case, the first line contains a single integer .
The input guarantees that .

输出描述:

For each test case, output three lines, each with a single integer, representing a,b,c respectively.
If there are multiple optimal solutions, you need only to output any of them.
示例1

输入

复制
3
2290283839620
1
9999999

输出

复制
1145141919810
1145141919810
1145141919810
0
1
-
4545454
5454545
454545