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