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