#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  int arr[n][m];
  int row[n];
  int col[m];
  for (int i = 0; i < n; i++) {
    row[i] = i;
    for (int j = 0; j < m; j++) {
      col[j] = j;
      cin >> arr[i][j];
    }
  }
  while (k--) {
    char c;
    int x, y;
    cin >> c >> x >> y;
    if (c == 'c') {
      x -= 1;
      y -= 1;
      swap(col[x], col[y]);
    } else if (c == 'r') {
      x -= 1;
      y -= 1;
      swap(row[x], row[y]);
    } else {
      x = row[x - 1];
      y = col[y - 1];
      cout << arr[x][y] << '\n';
    }
  }
}
