diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -27,6 +27,8 @@
                 lack[x][2] = lack[x][2] & lack[y][2]
             if A[x] == -1:
                 lack[x][1] += 1
+            else:
+                lack[x][2] = lack[x][2] - set([A[x]])
 
     dfs(1)
     flag = "Bob"
