The ememy of your ememy is friend.Given Q queries of form:
1 person1 person2
2 0 person
person is signified using id
your id is 0
for query of type 2 print following:
-1 if person is your enemy
1 if person is your friend
0 if person is not related to you
A person is your friend if he is:
enemy of your enemy
enemy of your's friend enemy and so on
constraints : 0<id<10^5 0<Q<10^5
example:
1 1 2
1 0 1
1 3 4
2 0 1
2 0 2
2 0 4
output:
-1
1
0