#include <bits/stdc++.h>
using namespace std;
int m[1010][1010], a[1010], b[1010];
int main() {
  int i, j, r, c, q;
  char s[5];
  for (scanf("%d%d%d", &r, &c, &q), i = 0; i < r; i++)
    for (j = 0; j < c; scanf("%d", &m[i][j]), j++)
      ;
  for (i = 0; i < r; a[i] = i, i++)
    ;
  for (i = 0; i < c; b[i] = i, i++)
    ;
  for (; q--;) {
    scanf("%s%d%d", s, &i, &j);
    i--;
    j--;
    if (s[0] == 'r')
      swap(a[i], a[j]);
    else if (s[0] == 'c')
      swap(b[i], b[j]);
    else
      printf("%d\n", m[a[i]][b[j]]);
  }
  return 0;
}
