#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int a[2000][2000];
int x[2000], y[2000];
int main() {
  cin >> n >> m;
  cin >> k;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) cin >> a[i][j];
  for (int i = 0; i < n; ++i) x[i] = i;
  for (int j = 0; j < m; ++j) y[j] = j;
  for (int i = 0; i < k; ++i) {
    int f, s;
    char c;
    cin >> c >> f >> s;
    --f;
    --s;
    if (c == 'c') {
      swap(y[f], y[s]);
    }
    if (c == 'r') {
      swap(x[f], x[s]);
    }
    if (c == 'g') {
      printf("%d\n", a[x[f]][y[s]]);
    }
  }
  return 0;
}
