diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -3,7 +3,7 @@
     input()
     s = input()
     cnt = 0
-    for j in range(1, len(s) - 1):
+    for j in range(1, len(s)):
         if s[j:] > s[:j]:
             cnt = 1
     if cnt:
