#include <bits/stdc++.h>
using namespace std;
int grid[1010][1010];
int px[1010], py[1010];
int main() {
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%d", &grid[i][j]);
    }
  }
  for (int i = 1; i <= n; i++) px[i] = i;
  for (int j = 1; j <= m; j++) py[j] = j;
  for (int i = 1; i <= k; i++) {
    char s[10];
    int x, y;
    scanf("%s %d %d", s, &x, &y);
    if (s[0] == 'c')
      swap(py[x], py[y]);
    else if (s[0] == 'r')
      swap(px[x], px[y]);
    else
      printf("%d\n", grid[px[x]][py[y]]);
  }
  return 0;
}
