#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> cm(m, 0);
  vector<int> rm(n, 0);
  for (int i = 0; i < n; ++i) {
    rm[i] = i;
  }
  for (int i = 0; i < m; ++i) {
    cm[i] = i;
  }
  vector<vector<int> > g(n, vector<int>(m));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> g[i][j];
    }
  }
  char c;
  int x, y;
  for (int i = 0; i < k; ++i) {
    cin >> c >> x >> y;
    if (c == 'c') {
      swap(cm[x - 1], cm[y - 1]);
    } else if (c == 'r') {
      swap(rm[x - 1], rm[y - 1]);
    } else if (c == 'g') {
      cout << g[rm[x - 1]][cm[y - 1]] << endl;
    }
  }
  return 0;
}
