Problem B — Bad Latex from 2026 ICPC Gran Premio de Mexico - Primera Fecha had some trouble with its testcases. Apparently, the input format didn't specify correctly the format restrictions on the testdata and contestants ended up very confused about it.
This time, you will help Racsó by coding a validator for the currently generated test cases. The restrictions Racsó set up so that the problem becomes easy to solve are the following:
Can you handle these test cases?
The first line of input contains an integer $$$n$$$ ($$$1 \leq n \leq 100$$$) — The number of lines of the test case.
The following $$$n$$$ lines contain a string $$$s_{i}$$$ ($$$1 \leq |s_{i}| \leq 1000$$$) — The $$$i$$$-th line contains the contents of the $$$i$$$-th line of the test case.
It is guaranteed that all $$$s_{i}$$$ consists of printable ASCII characters (codes in range $$$[32, 126]$$$).
Print a single line — "Ok" if the test case is valid or "Validation failed" otherwise.
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
Ok
3This example should showAn incorrect test case since 100.10^{1000}Should not be correct.
Validation failed
2Another simple example with multiple incorrect braces$$ 10^{100} = 10 {14} $$
Validation failed
1$ 100^{2x + 1} $ should not be possible
Validation failed
1Leading and Trailing
Validation failed
2Hey, this one looks like it is not valid.However, it is even if it contains a single 0
Ok
1Hello, this has two consecutive spaces.
Validation failed
1Wait, is 000 valid?
Validation failed
1No nested $ X_{10_{11}} $ allowed!
Validation failed
1My email is johndoe@email.com
Validation failed
| Название |
|---|


