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