diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -62,6 +62,7 @@
         for i in range(n):
             if pre[i] + suf[i] - 1 == len(g):
                 ans.append(i + 1)
+        print(len(ans))
         print(*ans)
 
 
@@ -96,7 +97,6 @@
     for i in range(n):
         if ans[i] == "3" and cnt[pre[i]] > 1:
             ans[i] = "2"
-    print(len(ans))
     print("".join(ans))
     return
 
