diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -3,5 +3,7 @@
 
 if (s[0] == "A") and (s[-1] == "B"):
     print("No")
+elif (len(s) == 2) and (s[0] != s[-1]):
+    print("No")
 else:
     print("Yes")
