diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -3,7 +3,7 @@
 for i in range(1, len(s)):
     if min_ > s[i:] + s[:i]:
         min_ = s[i:] + s[:i]
-    else:
+    if max_ < s[i:] + s[:i]:
         max_ = s[i:] + s[:i]
 print(min_)
 print(max_)
