#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  int arr[n][m];
  int row[n];
  int col[m];
  for (int i = 0; i < n; i++) {
    row[i] = i;
    for (int j = 0; j < m; j++) {
      scanf("%d", &arr[i][j]);
      col[j] = j;
    }
  }
  char a[2];
  int x, y;
  while (k--) {
    scanf("%s%d%d", &a, &x, &y);
    x--;
    y--;
    int p = x;
    int q = y;
    if (a[0] == 'g') {
      p = row[x];
      q = col[y];
      printf("%d\n", arr[p][q]);
    } else if (a[0] == 'c') {
      p = col[x];
      q = col[y];
      col[x] = q;
      col[y] = p;
    } else {
      p = row[x];
      q = row[y];
      row[x] = q;
      row[y] = p;
    }
  }
}
