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