#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10, Max = 2e5 + 10;
const long long MOD = 1e9 + 7, OO = 1e9;
int n, m, k;
int a[N][N];
int havecol[N], haverow[N];
int main() {
  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 <= max(n, m); ++i) haverow[i] = i, havecol[i] = i;
  while (k-- > 0) {
    char type;
    int first, second;
    scanf(" %c%d%d", &type, &first, &second);
    if (type == 'r') {
      swap(haverow[first], haverow[second]);
    } else if (type == 'c') {
      swap(havecol[first], havecol[second]);
    } else {
      int x = haverow[first];
      int y = havecol[second];
      printf("%d\n", a[x][y]);
    }
  }
}
