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