#include <bits/stdc++.h>
using namespace std;
int MyGrid[1001][1001];
int rows[1001];
int coloms[1001];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int q, w, e, r;
  for (q = 0; q < n; q++) {
    for (w = 0; w < m; w++) {
      scanf("%d", &MyGrid[q][w]);
    }
  }
  for (q = 0; q < n; q++) rows[q] = q;
  for (q = 0; q < m; q++) coloms[q] = q;
  while (k--) {
    char c;
    int a, b;
    scanf("\n%c %d%d", &c, &a, &b);
    if (c == 'c') {
      int x = coloms[a - 1];
      coloms[a - 1] = coloms[b - 1];
      coloms[b - 1] = x;
    } else if (c == 'r') {
      int x = rows[a - 1];
      rows[a - 1] = rows[b - 1];
      rows[b - 1] = x;
    } else
      printf("%d\n", MyGrid[rows[a - 1]][coloms[b - 1]]);
  }
  return 0;
}
