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