#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
int n, m, k, ary[1010][1010];
int indx[1010], indy[1010];
int main(void) {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int i = 0; i < 1010; i++) {
    indx[i] = indy[i] = i;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> ary[i][j];
    }
  }
  char ch;
  int x, y;
  for (int i = 0; i < k; i++) {
    cin >> ch >> x >> y;
    if (ch == 'g') {
      cout << ary[indx[x - 1]][indy[y - 1]] << endl;
    } else if (ch == 'c') {
      swap(indy[x - 1], indy[y - 1]);
    } else
      swap(indx[x - 1], indx[y - 1]);
  }
  return 0;
}
