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