#include <bits/stdc++.h>
using namespace std;
int a[1005][1005];
int R[1005], C[1005];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  cin.ignore();
  for (int i = 0; i < n; i++) {
    R[i] = i;
  }
  for (int j = 0; j < m; j++) {
    C[j] = j;
  }
  for (int kk = 0; kk < k; kk++) {
    char q;
    int x, y;
    cin >> q >> x >> y;
    cin.ignore();
    x--, y--;
    if (q == 'g') {
      int r = R[x];
      int c = C[y];
      cout << a[r][c] << endl;
    } else if (q == 'r') {
      int tmp = R[x];
      R[x] = R[y];
      R[y] = tmp;
    } else if (q == 'c') {
      int tmp = C[x];
      C[x] = C[y];
      C[y] = tmp;
    }
  }
  return 0;
}
