#include <bits/stdc++.h>
const double pi = acos(-1.0), eps = 1e-9;
const int dx[8] = {1, -1, 0, 0, 1, 1, -1, -1};
const int dy[8] = {0, 0, 1, -1, 1, -1, -1, 1};
const int MO = (int)(1e9 + 7);
using namespace std;
int who1[1000001], who2[1000001];
int a[1001][1001], n, m, Q;
int main() {
  scanf("%d%d%d", &n, &m, &Q);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) scanf("%d", &a[i][j]);
  for (int i = 1; i <= n; i++) who2[i] = i;
  for (int i = 1; i <= m; i++) who1[i] = i;
  while (Q--) {
    scanf(" ");
    char op = getchar();
    switch (op) {
      case 'c': {
        int a, b;
        scanf("%d%d", &a, &b);
        swap(who1[a], who1[b]);
        break;
      }
      case 'r': {
        int a, b;
        scanf("%d%d", &a, &b);
        swap(who2[a], who2[b]);
        break;
      }
      case 'g': {
        int a, b;
        scanf("%d%d", &a, &b);
        printf("%d\n", ::a[who2[a]][who1[b]]);
        break;
      }
    }
  }
}
