#include <bits/stdc++.h>
using namespace std;
int r[1001], c[1001], rh[1001], ch[1001];
int a[1001][1001];
int main() {
  int n, m, x, y, i, j, q, t;
  char cmd[2];
  scanf("%d%d%d", &n, &m, &q);
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++) scanf("%d", &a[i][j]);
  for (i = 0; i < n; i++) r[i] = rh[i] = i;
  for (i = 0; i < m; i++) c[i] = ch[i] = i;
  while (q--) {
    scanf("%s%d%d", cmd, &x, &y);
    x--;
    y--;
    if (cmd[0] == 'c') {
      t = c[x];
      c[x] = c[y];
      c[y] = t;
    }
    if (cmd[0] == 'r') {
      t = r[x];
      r[x] = r[y];
      r[y] = t;
    }
    if (cmd[0] == 'g') printf("%d\n", a[r[x]][c[y]]);
  }
  return 0;
}
