#include <bits/stdc++.h>
using namespace std;
int N, M, K, ar[1007][1007], rw[1007], cl[1007];
void oku() {
  scanf("%d %d %d", &N, &M, &K);
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= M; j++) scanf("%d", &ar[i][j]);
  for (int i = 1; i <= N; i++) rw[i] = i;
  for (int j = 1; j <= M; j++) cl[j] = j;
}
int findr(int a) {
  for (int i = 1; i <= N; i++)
    if (rw[i] == a) return i;
}
int findc(int a) {
  for (int i = 1; i <= M; i++)
    if (cl[i] == a) return i;
}
void islem() {
  char ch;
  int a, b, t, p, q;
  for (int i = 1; i <= K; i++) {
    scanf(" %c %d %d", &ch, &a, &b);
    if (ch == 'r') {
      p = findr(a);
      q = findr(b);
      t = rw[p];
      rw[p] = rw[q];
      rw[q] = t;
    }
    if (ch == 'c') {
      p = findc(a);
      q = findc(b);
      t = cl[p];
      cl[p] = cl[q];
      cl[q] = t;
    }
    if (ch == 'g') {
      p = findr(a);
      q = findc(b);
      printf("%d\n", ar[p][q]);
    }
  }
}
int main() {
  oku();
  islem();
  return 0;
}
