diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,7 +1,7 @@
 def main():
     r, c = map(int, input().split())
     a = [list(map(int, input().split())) for _ in range(2)]
-    print(a[c - 1][r - 1])
+    print(a[r - 1][c - 1])
 
 
 if __name__ == "__main__":
