#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int INF = 1 << 29;
const int MOD = 1e9 + 7;
bool isPowerOfTwo(long long int x) { return x && (!(x & (x - 1))); }
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dy[] = {0, -1, 0, 1, 1, -1, -1, 1};
int main() {
  fastio();
  int tc = 1;
  while (tc--) {
    int n, m, k;
    cin >> n >> m >> k;
    int a[n][m];
    for (int i = 0; i < (n); i++) {
      for (int j = 0; j < (m); j++) cin >> a[i][j];
    }
    map<int, int> r, c, r2, c2;
    for (int i = 0; i < (n); i++) r[i] = i;
    for (int i = 0; i < (m); i++) c[i] = i;
    while (k--) {
      char c1;
      cin >> c1;
      int x, y;
      cin >> x >> y;
      x--, y--;
      if (c1 == 'g') {
        cout << a[r[x]][c[y]];
        cout << "\n";
        ;
      } else if (c1 == 'c') {
        int uk = c[x], uk1 = c[y];
        c[x] = uk1;
        c[y] = uk;
      } else {
        int uk = r[x], uk1 = r[y];
        r[x] = uk1;
        r[y] = uk;
      }
    }
  }
  return 0;
}
