#include <bits/stdc++.h>
int N, M, K, T[1001][1001], r[1001], c[1001], a, b, t;
char C;
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", T[i] + j);
  for (int i = 0; i < N; i++) r[i] = i;
  for (int i = 0; i < M; i++) c[i] = i;
  for (int i = 0; i < K; i++) {
    scanf(" %c%d%d", &C, &a, &b);
    if (C == 'c') t = c[a - 1], c[a - 1] = c[b - 1], c[b - 1] = t;
    ;
    if (C == 'r') t = r[a - 1], r[a - 1] = r[b - 1], r[b - 1] = t;
    ;
    if (C == 'g') printf("%d\n", T[r[a - 1]][c[b - 1]]);
  }
}
