#include <bits/stdc++.h>
int main() {
  int n, m, k, i, j, p, x, y, num, out[500000], number = 0;
  char ch;
  int table[1000][1000];
  int row[1000], column[1000];
  scanf("%d%d%d\n", &n, &m, &k);
  for (i = 0; i < n; i++) {
    row[i] = i;
  }
  for (j = 0; j < m; j++) {
    column[j] = j;
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      scanf("%d", &table[i][j]);
    }
  }
  for (p = 0; p < k; p++) {
    scanf("\n%c%d%d", &ch, &x, &y);
    if (ch == 'c') {
      num = column[x - 1];
      column[x - 1] = column[y - 1];
      column[y - 1] = num;
    } else if (ch == 'r') {
      num = row[x - 1];
      row[x - 1] = row[y - 1];
      row[y - 1] = num;
    } else
      out[number++] = table[row[x - 1]][column[y - 1]];
  }
  for (i = 0; i < number; i++) {
    printf("%d\n", out[i]);
  }
  return 0;
}
