diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,6 +1,8 @@
 N = int(input())
 S = input()
 ck = 0
+if S == "BA":
+    exit(print("No"))
 for i in range(N):
     if S[i] != S[-1 - i]:
         ck = 1
