diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -2,13 +2,14 @@
 
 N, Q = map(int, input().split())
 follow = defaultdict(bool)
+
 for i in range(Q):
     t, a, b = map(int, input().split())
     if t == 1:
         follow[(a, b)] = True
 
     elif t == 2:
-        follow[(b, a)] = False
+        follow[(a, b)] = False
 
     elif t == 3:
         if follow[(a, b)] and follow[(b, a)]:
