#include <bits/stdc++.h>
using namespace std;
int n, m, k, a[1001][1001], row[1001], col[1001], x, y;
char t;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) scanf("%d", &a[i][j]);
  }
  for (int i = 1; i <= n; i++) row[i] = i;
  for (int i = 1; i <= m; i++) col[i] = i;
  for (int i = 0; i < k; i++) {
    scanf(" %c %d %d ", &t, &x, &y);
    if (t == 'r') {
      int tmp = row[x];
      row[x] = row[y], row[y] = tmp;
    } else if (t == 'c') {
      int tmp = col[x];
      col[x] = col[y], col[y] = tmp;
    } else
      printf("%d\n", a[row[x]][col[y]]);
  }
  return 0;
}
