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