#include <bits/stdc++.h>
using namespace std;
const int MAX{1010};
int A[MAX][MAX], rs[MAX], cs[MAX];
struct Query {
  string c;
  int x, y;
};
vector<int> solve(int N, int M, const vector<Query>& qs) {
  for (int i = 1; i <= N; ++i) rs[i] = i;
  for (int i = 1; i <= M; ++i) cs[i] = i;
  vector<int> ans;
  for (const auto& q : qs) {
    switch (q.c.front()) {
      case 'c':
        swap(cs[q.x], cs[q.y]);
        break;
      case 'r':
        swap(rs[q.x], rs[q.y]);
        break;
      default:
        ans.push_back(A[rs[q.x]][cs[q.y]]);
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  int N, M, K;
  cin >> N >> M >> K;
  for (int i = 1; i <= N; ++i)
    for (int j = 1; j <= M; ++j) cin >> A[i][j];
  vector<Query> qs(K);
  for (int i = 0; i < K; ++i) cin >> qs[i].c >> qs[i].x >> qs[i].y;
  auto ans = solve(N, M, qs);
  for (auto x : ans) cout << x << '\n';
  return 0;
}
