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