#include <bits/stdc++.h>
using namespace std;
const double eps = 1.0e-11;
const double pi = acos(-1.0);
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<vector<int> > d(n, vector<int>(m));
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++) cin >> d[i][j];
  vector<int> r(n), c(m);
  for (long long i = 0; i < n; i++) r[i] = i;
  for (long long i = 0; i < m; i++) c[i] = i;
  for (long long test = 0; test < k; test++) {
    char ch;
    int a, b;
    cin >> ch >> a >> b;
    --a, --b;
    if (ch == 'c') swap(c[a], c[b]);
    if (ch == 'r') swap(r[a], r[b]);
    if (ch == 'g') cout << d[r[a]][c[b]] << endl;
  }
  return 0;
}
