#include <bits/stdc++.h>
using namespace std;
int t[2000][2000];
int r[2000];
int c[2000];
int main() {
  ios ::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      cin >> t[i][j];
    }
  for (int i = 0; i < n; i++) {
    r[i] = i;
  }
  for (int i = 0; i < m; i++) {
    c[i] = i;
  }
  while (k--) {
    char ca;
    int a, b;
    cin >> ca >> a >> b;
    a--;
    b--;
    if (ca == 'r') {
      int m = r[a];
      r[a] = r[b];
      r[b] = m;
    } else if (ca == 'c') {
      int m = c[a];
      c[a] = c[b];
      c[b] = m;
    } else
      cout << t[r[a]][c[b]] << endl;
  }
  return 0;
}
