#include <bits/stdc++.h>
using namespace std;
int a[1001][1001], n, m, k, stolb[1001], strok[1001];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
      stolb[j] = j;
      strok[i] = i;
    }
  }
  for (int i = 0; i < k; i++) {
    char x;
    int ii, jj;
    cin >> x >> ii >> jj;
    if (x == 'c') {
      swap(stolb[ii - 1], stolb[jj - 1]);
    } else {
      if (x == 'r') {
        swap(strok[ii - 1], strok[jj - 1]);
      } else {
        cout << a[strok[ii - 1]][stolb[jj - 1]] << endl;
      }
    }
  }
  return 0;
}
