diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -59,5 +59,5 @@
             ans[j] = i + 1
         new.append(j)
 
-for i in range(1, n):
+for i in range(1, n + 1):
     print(ans[i])
