#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, x, y;
  scanf("%d%d%d", &n, &m, &k);
  int linha[n + 1], coluna[m + 1];
  for (int i = 1; i <= n; i++) linha[i] = i;
  for (int i = 1; i <= m; i++) coluna[i] = i;
  int v[n + 1][m + 1];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%d", &v[i][j]);
    }
  }
  char c;
  for (int i = 0; i < k; i++) {
    scanf(" %c%d%d", &c, &x, &y);
    switch (c) {
      case 'c':
        swap(coluna[x], coluna[y]);
        break;
      case 'r':
        swap(linha[x], linha[y]);
        break;
      default:
        printf("%d\n", v[linha[x]][coluna[y]]);
        break;
    }
  }
  return 0;
}
