diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,7 +1,7 @@
 n, m = map(int, input().split())
 s = [input() for i in range(n)]
 a = 0
-for i in range(1, (1 << n) - 1):
+for i in range(1, 1 << n):
     c = [0] * 26
     for j in range(n):
         if (i >> j) & 1:
