시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 1024 MB252836536.723%

문제

An integer is called a repdigit if it is positive and its decimal representation consists of repeated instances of the same digit. For example, $1$, $666$, $4444$, and $999999$ are repdigits, while $0$, $44244$, $50216$, and $787788$ are not.

You are given a positive integer $n$. It is known that $n$ can be represented as $n = a + b$, where $a$ and $b$ are repdigits. Find any such representation.

입력

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). The description of the test cases follows.

The only line of each test case contains a single integer $n$ without leading zeros ($2 \le n < 10^{4000}$). It is guaranteed that $n$ can be represented as $n = a + b$, where $a$ and $b$ are repdigits.

It is guaranteed that the total number of digits in $n$ over all test cases does not exceed $10^5$.

출력

For each test case, print two integers $a$ and $b$ such that $n = a + b$ and both $a$ and $b$ are repdigits.

If there are multiple solutions, print any of them.

예제 입력 1

6
2
786
1332
89110
2333333
10000000000000000000000000001

예제 출력 1

1 1
777 9
333 999
88888 222
2222222 111111
9999999999999999999999999999 2