Tomorrow is the Gran Premio de Mexico 2026 Primera Fecha, and you are in a hurry to finish setting all the problems for tomorrow's contest. Since two heads are better than one, you asked your friend Jimbo to help you out with the statements of the problems. However, this quote didn't end up being true — Jimbo wrote the statements but without respecting some writing style rules!
For an easier read, you want to ensure that the following rules are held:
For example, if Jimbo wrote $$$1000000000$$$, then you must transform it to $$$10^{9}$$$ in LaTeX, so the final text would be 10^{9}.
For example, if Jimbo wrote $$$123400000$$$, then you must transform it to $$$1.234 \cdot 10^{8}$$$ in LaTeX, so the final text would be 1.234\cdot10^{8}
Since you are very tired from setting up the solutions, validators and testcases, you will automatize this process by writing a program that applies these rules on the statements.
The first line of input contains an integer $$$n$$$ ($$$1 \leq n \leq 100$$$) — The number of lines of a given statement.
The following $$$n$$$ lines of input contain a string $$$s_{i}$$$ ($$$1 \leq |s_{i}| \leq 1000$$$) – The $$$i$$$-th line contains the $$$i$$$-th line of the given statement.
It is guaranteed that the statement will only consist of letters (could be in lowercase or uppercase), digits, spaces and special symbols (!?.,;$#^{}_=+*) and there won't be any leading or trailing space. Consider that if a line ends with an integer and the next one starts with an integer, these two are not part of the same value.
Print $$$n$$$ lines — The $$$i$$$-th line must contain the $$$i$$$-th line of the statement after applying the rules.
4This example shows a valueOf 1000000000 without being compressed to 10^{9}Which is annoying when read. $ S_{10} = 2^{100000} + 780000 $My ID is RA180000 but that was back in the year 20000
This example shows a value
Of 10^{9} without being compressed to 10^{9}
Which is annoying when read. $ S_{10} = 2^{100000} + 7.8\cdot10^{5} $
My ID is RA180000 but that was back in the year 2\cdot10^{4}
| Название |
|---|


