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