#include <bits/stdc++.h>
using namespace std;
int mas[1010][1010];
int row[1010], col[1010];
int n, m, k;
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      scanf("%d", &mas[i][j]);
    }
  }
  for (int i = 0; i < n; ++i) {
    row[i] = i;
  }
  for (int i = 0; i < m; ++i) {
    col[i] = i;
  }
  scanf("%d", &n);
  for (int i = 0; i < k; ++i) {
    char c;
    int a, b;
    scanf("%c %d %d\n", &c, &a, &b);
    a--;
    b--;
    if (c == 'c') {
      col[a] ^= col[b];
      col[b] ^= col[a];
      col[a] ^= col[b];
    }
    if (c == 'r') {
      row[a] ^= row[b];
      row[b] ^= row[a];
      row[a] ^= row[b];
    }
    if (c == 'g') {
      printf("%d\n", mas[row[a]][col[b]]);
    }
  }
  return 0;
}
