Groups 1
In Zhitolend, children's phones have been taken away, prompting them to rediscover friendships. Initially, all children have forgotten about each other, so no one is friends with anyone else.
There are n
children living in the city, and each child is identified by a unique number from 1
to n
.
Initially, each child forms their own group.
You are given an array a
of size n
, where a[i]
represents the influence of child i
.
Akia and Gulnar need your help to determine which group has the greatest influence. They will provide you with q
queries to resolve.
There are two types of queries:
1 i j
: Determine which group is more influential. If the group containing childi
is more influential, output ">". If the group containing childj
is more influential, output "<". If both children are in the same group or the groups have equal influence, output "=".2 i j
: Merge the group containing childi
with the group containing childj
. If they are already in the same group, no action is needed.
The influence of a newly formed group is the sum of the influences of the groups containing children i
and j
.
Input
The first line contains the integers n
and q
(1 ≤ n, q ≤ 2*10^5
).
The second line contains the array a
(1 ≤ a[i] ≤ 10^9
).
The following q
lines contain the queries.
Output
Provide the answers to the queries of type 1
.