#include <bits/stdc++.h>
using namespace std;
int a[1003][1003], r1[1003], c1[1003], ans[500005];
int main() {
  int n, m, k, p = 0, x, y, i, j;
  char s;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= n; i++) {
    r1[i] = i;
  }
  for (i = 1; i <= m; i++) {
    c1[i] = i;
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      scanf("%d", &a[i][j]);
    }
  }
  for (i = 0; i < k; i++) {
    scanf(" %c%d%d", &s, &x, &y);
    if (s == 'r') {
      swap(r1[x], r1[y]);
    } else if (s == 'c') {
      swap(c1[x], c1[y]);
    } else {
      ans[p++] = a[r1[x]][c1[y]];
    }
  }
  for (i = 0; i < p; i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
