#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1003;
int a[MAX_N][MAX_N];
int p[MAX_N];
int q[MAX_N];
int main() {
  int k, m, n;
  while (scanf(" %d %d %d", &n, &m, &k) > 0) {
    for (int i = 0; i < n; i++) {
      p[i] = i;
    }
    for (int j = 0; j < m; j++) {
      q[j] = j;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        scanf(" %d", &a[i][j]);
      }
    }
    for (int l = 0; l < k; l++) {
      int x, y;
      char ch;
      scanf(" %c %d %d", &ch, &x, &y);
      x--;
      y--;
      switch (ch) {
        case 'r':
          swap(p[x], p[y]);
          break;
        case 'c':
          swap(q[x], q[y]);
          break;
        case 'g':
          printf("%d\n", a[p[x]][q[y]]);
          break;
        default:
          assert(false);
      }
    }
  }
  return 0;
}
