diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -3,3 +3,6 @@
 for i in range(len(S) - 1):
     if S[i - 1] != S[i] and S[i] != S[i + 1]:
         print(i + 1)
+        exit()
+
+print(len(S))
