#include <bits/stdc++.h>
using namespace std;
const int maxN = 1000 + 10;
int a[maxN][maxN];
int linkC[maxN], linkR[maxN];
int N, M, Q;
int main() {
  scanf("%d%d%d", &N, &M, &Q);
  for (int i = 0; i < N; ++i)
    for (int j = 0; j < M; ++j) scanf("%d", &a[i][j]);
  scanf("\n");
  for (int i = 0; i < N; ++i) linkR[i] = i;
  for (int i = 0; i < M; ++i) linkC[i] = i;
  while (Q--) {
    char c;
    int x, y;
    scanf("%c%d%d\n", &c, &x, &y);
    --x;
    --y;
    switch (c) {
      case 'c':
        swap(linkC[x], linkC[y]);
        break;
      case 'r':
        swap(linkR[x], linkR[y]);
        break;
      case 'g':
        printf("%d\n", a[linkR[x]][linkC[y]]);
    }
  }
  return 0;
}
