#include <bits/stdc++.h>
using std::map;
const int MAXN = 1000 + 3;
int table[MAXN][MAXN];
int n, m, k;
map<int, int> r, c;
int main(int argc, char *argv[]) {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    r[i] = i;
    for (int j = 1; j <= m; ++j) {
      if (i == 1) c[j] = j;
      scanf("%d", &table[i][j]);
    }
  }
  char cmd;
  int tmp, x, y;
  while (k--) {
    scanf("%s%d%d", &cmd, &x, &y);
    if (cmd == 'r') {
      tmp = r[x];
      r[x] = r[y];
      r[y] = tmp;
    } else if (cmd == 'c') {
      tmp = c[x];
      c[x] = c[y];
      c[y] = tmp;
    } else
      printf("%d\n", table[r[x]][c[y]]);
  }
  return 0;
}
