#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  int a[n][m], r[n], c[m], i, j, x, y;
  char s1[3];
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      scanf("%d", &a[i][j]);
      c[j] = j;
    }
    r[i] = i;
  }
  for (i = 0; i < k; i++) {
    scanf("%s%d%d", s1, &x, &y);
    if (s1[0] == 'r')
      swap(r[x - 1], r[y - 1]);
    else if (s1[0] == 'c')
      swap(c[x - 1], c[y - 1]);
    else
      cout << a[r[x - 1]][c[y - 1]] << endl;
  }
  return 0;
}
