Mirko's average

After each pair of position updates, report whether Mirko's repeated pairwise average increased, decreased, or stayed the same.

Medium6MathImplementationPrefix sumNo attempts yetTime limit2sMemory limit512 MB

Problem

To add up several numbers you usually add the first two, then add the third number to that result, then add the fourth number to the new result, and so on. Mirko decided that an average can be computed the same way. He first takes the average of the first two numbers, then the average of that result and the third number, then the average of the new result and the fourth number, continuing to the last number.

For the sequence 1, 5, 9, 7 Mirko computes (1 + 5) / 2 = 3, then (3 + 9) / 2 = 6, and finally (6 + 7) / 2 = 6.5. The real average of this sequence is 5.5, not 6.5.

Mirko recently finished every episode of Dexter and True Detective, so he has nothing left to do and plays with averages instead. Now and then he changes two elements of his sequence and tries to guess whether the average produced by his own method went down, went up, or stayed the same. Help Mirko and write a program that answers these questions.

Input

The first line contains the length of the sequence NN (2N1000002 \le N \le 100\,000).

The second line contains the NN integers of Mirko's sequence. Each integer is between 11 and 10910^9.

The third line contains the number of changes MM (1M1000001 \le M \le 100\,000).

Each of the next MM lines holds one change in the form p A q B. It means: set the pp-th element of the sequence to AA and the qq-th element to BB. Here 1p,qN1 \le p, q \le N, pqp \ne q, and 1A,B1091 \le A, B \le 10^9. The changes are cumulative, so the changed sequence is the one the next change applies to.

Output

For each change print one line: < if the average produced by Mirko's method went down, > if it went up, and = if it stayed the same.

Hint

In the first example the sequence and Mirko's average take these values in order.

sequenceMirko's average
20, 40, 50, 60, 100, 2550.0
55, 5, 50, 60, 100, 2550.0
135, 5, 50, 60, 100, 1045.0
135, 5, 50, 20, 100, 2045.0
135, 5, 100, 83, 100, 2056.0