#include <bits/stdc++.h>
int e[1111][1111];
int row[1111];
int cum[1111];
using namespace std;
int main() {
  int n, m, k, q, p, ii, jj;
  char s1;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) row[i] = i;
  for (int i = 1; i <= m; i++) cum[i] = i;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) scanf("%d", &e[i][j]);
  for (int j = 1; j <= k; j++) {
    scanf("%s %d %d", &s1, &q, &p);
    if (s1 == 'r') {
      int t = row[q];
      row[q] = row[p];
      row[p] = t;
    } else if (s1 == 'c') {
      int t1 = cum[q];
      cum[q] = cum[p];
      cum[p] = t1;
    } else
      printf("%d\n", e[row[q]][cum[p]]);
  }
}
