#include <bits/stdc++.h>
using namespace std;
int arr[1000 + 10][1000 + 10];
int row[1000 + 10], col[1000 + 10];
int main() {
  int r, c, q;
  cin >> r >> c >> q;
  for (int i = 1; i <= r; i++) {
    row[i] = i;
    for (int j = 1; j <= c; j++) {
      cin >> arr[i][j];
      col[j] = j;
    }
  }
  int x, y;
  char type;
  for (int i = 0; i < q; i++) {
    cin >> type >> x >> y;
    if (type == 'c')
      swap(col[x], col[y]);
    else if (type == 'r')
      swap(row[x], row[y]);
    else
      cout << arr[row[x]][col[y]] << endl;
  }
}
