#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const double pi = 3.1415926535897932384626433832795;
double eps = 1e-9;
bool isend = false;
char _buf[1 << 20];
inline string gs() {
  if (scanf("%s", _buf) == -1) {
    isend = true;
    return "";
  }
  return string(_buf);
}
inline string gl() {
  gets(_buf);
  return string(_buf);
}
inline int gi() {
  int a;
  scanf("%d", &a);
  return a;
}
void solve();
int main() {
  solve();
  return 0;
}
void solve() {
  int n = gi();
  int m = gi();
  int k = gi();
  vector<vector<int> > a(n, vector<int>(m));
  map<int, int> r;
  map<int, int> c;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      a[i][j] = gi();
    }
  }
  for (int i = 0; i < n; ++i) r[i] = i;
  for (int i = 0; i < m; ++i) c[i] = i;
  for (int i = 0; i < k; ++i) {
    char cmd;
    scanf("\n%c", &cmd);
    int x = gi();
    int y = gi();
    --x, --y;
    if (cmd == 'c') {
      swap(c[x], c[y]);
    } else if (cmd == 'r') {
      swap(r[x], r[y]);
    } else
      printf("%d\n", a[r[x]][c[y]]);
  }
}
