#include <bits/stdc++.h>
int main() {
  int table[1001][1001];
  int row[1001], col[1001];
  int n, m, k, i, j;
  char op;
  int op1, op2;
  int temp;
  scanf("%d %d %d", &n, &m, &k);
  for (i = 1; i <= n; i++) row[i] = i;
  for (i = 1; i <= m; i++) col[i] = i;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) scanf("%d", &table[i][j]);
  for (i = 0; i < k; i++) {
    getchar();
    scanf("%c %d %d", &op, &op1, &op2);
    if (op == 'c') {
      temp = col[op1];
      col[op1] = col[op2];
      col[op2] = temp;
    } else if (op == 'r') {
      temp = row[op1];
      row[op1] = row[op2];
      row[op2] = temp;
    } else if (op == 'g')
      printf("%d\n", table[row[op1]][col[op2]]);
  }
  return 0;
}
