CF2038N.Fixing the Expression

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Fixing the Expression

An expression is a string consisting of three characters, where the first and the last characters are digits (from 00 to 99), and the middle character is a comparison symbol (<, = or >).

An expression is true if the comparison symbol matches the digits (for example, if the first digit is strictly less than the last digit, the comparison symbol should be <).

For example, the expressions 1<3, 4>2, 0=0 are true, while 5>5, 7<3 are not.

You are given a string ss, which is an expression. Change as few characters as possible so that ss becomes a true expression. Note that if ss is already true, you should leave it as it is.

Input

The first line contains one integer tt (1t3001 \le t \le 300) — the number of test cases.

Each test case consists of one line containing the string ss (s=3|s| = 3, the first and the last characters of ss are digits, the second character is a comparison symbol).

Output

For each test case, print a string consisting of 33 characters — a true expression which can be obtained by changing as few characters as possible in ss. If there are multiple answers, print any of them.

Samples

5
3<7
3>7
8=9
0=0
5<3
3<7
8>7
8<9
0=0
0<3

在线编程 IDE

建议全屏模式获得最佳体验