Little E is a senior magic enthusiast. Recently, he has harvested a batch of magic puzzles. After arranging these puzzles in a row, he found that these puzzles can be operated in ways:
1. You can select any two separate puzzles to connect them together.
2. You can select an interval of any size to connect all the puzzles in the interval.
3. Query any two puzzles.
Puzzles are numbered from to
. When Little E operates in
, he wants to know whether the two specified puzzles are connected. Please tell him.
In the first line, enter two positive integers(
), representing
pieces of puzzle, and perform
operations.
Next,lines, each with three positive integers
![]()
. When
is taken as
, it represents operation
, connecting the puzzles numbered
and
. When
is taken as
, it represents operation
, connecting all puzzles within the range of
. When
takes
, query
and
to determine whether the two pieces of puzzle are connected together.
For each query, if the two puzzle pieces are connected, output ""; otherwise, ouput "
"