#include <bits/stdc++.h>
using namespace std;
const double PI = std::atan(1.0) * 4;
int matrix[1001][1001];
typedef struct oper {
  char type;
  int x, y;
} oper;
int main(int argc, char* argv[]) {
  int n, m, k;
  cin >> n >> m >> k;
  int newrows[n];
  int newcols[m];
  for (int i = 0; i < n; ++i) {
    newrows[i] = i;
    for (int j = 0; j < m; ++j) {
      newcols[j] = j;
      cin >> matrix[i][j];
    }
  }
  char opt;
  int x, y, aux;
  vector<oper> q;
  vector<oper>::iterator it;
  for (int i = 0; i < k; ++i) {
    cin >> opt >> x >> y;
    --x;
    --y;
    if (opt == 'g') {
      cout << matrix[newrows[x]][newcols[y]] << endl;
    } else {
      if (opt == 'r') {
        aux = newrows[x];
        newrows[x] = newrows[y];
        newrows[y] = aux;
      } else {
        aux = newcols[x];
        newcols[x] = newcols[y];
        newcols[y] = aux;
      }
    }
  }
  return EXIT_SUCCESS;
}
