#include <bits/stdc++.h>
using namespace std;
int tb[1001][1001];
int strok[1001];
int stolb[1001];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; ++i) {
    strok[i] = i;
    for (int j = 0; j < m; ++j) {
      cin >> tb[i][j];
      stolb[j] = j;
    }
  }
  vector<int> res;
  res.reserve(500001);
  for (int i = 0; i < k; ++i) {
    char s;
    int x, y;
    cin >> s >> x >> y;
    if (s == 'c') {
      int tmp = stolb[x - 1];
      stolb[x - 1] = stolb[y - 1];
      stolb[y - 1] = tmp;
    } else if (s == 'r') {
      int tmp = strok[x - 1];
      strok[x - 1] = strok[y - 1];
      strok[y - 1] = tmp;
    } else {
      res.push_back(tb[strok[x - 1]][stolb[y - 1]]);
    }
  }
  for (int i = 0; i < res.size(); ++i) {
    cout << res[i] << endl;
  }
  return 0;
}
