#include <bits/stdc++.h>
using namespace std;
int a[100001] = {0};
int b[100001] = {0};
int c[1002][1002] = {0};
int main() {
  int i, j, k, l, r, g, m, n, t, x, y;
  char s;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) scanf("%d", &c[i][j]);
  for (i = 1; i <= n; i++) a[i] = i;
  for (i = 1; i <= m; i++) b[i] = i;
  for (i = 1; i <= k; i++) {
    getchar();
    scanf("%c%d%d", &s, &x, &y);
    if (s == 'c') {
      swap(b[x], b[y]);
    }
    if (s == 'r') {
      swap(a[x], a[y]);
    }
    if (s == 'g') {
      printf("%d\n", c[a[x]][b[y]]);
    }
  }
  return 0;
}
