#include <bits/stdc++.h>
using namespace std;
int xum[1008], yum[1008];
int a[1008][1008];
int main() {
  int n, k, m;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) scanf("%d", &a[i][j]);
  char s;
  n = max(n, m);
  int x, y;
  for (int i = 1; i <= n; ++i) {
    xum[i] = i, yum[i] = i;
  }
  while (k--) {
    scanf("%s%d%d", &s, &x, &y);
    if (s == 'r') {
      swap(xum[x], xum[y]);
    } else if (s == 'c') {
      swap(yum[x], yum[y]);
    } else if (s == 'g') {
      printf("%d\n", a[xum[x]][yum[y]]);
    }
  }
}
