diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -8,7 +8,7 @@
 for i in range(N - 1, -1, -1):
     if need[i]:
         for j in skill[i][2:]:
-            need[j] = True
+            need[j - 1] = True
 
 ans = 0
 for i in range(N):
