#include <bits/stdc++.h>
using namespace std;
int main() {
  int row[1002], column[1002], m, n, array[1002][1002], k;
  cin >> m >> n >> k;
  for (int i = 0; i < m; i++) {
    row[i + 1] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    column[i + 1] = i + 1;
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      cin >> array[i][j];
    }
  }
  char g;
  int x, y;
  while (k--) {
    cin >> g >> x >> y;
    if (g == 'g') {
      cout << array[row[x] - 1][column[y] - 1] << endl;
    } else if (g == 'c') {
      int temp = column[x];
      column[x] = column[y];
      column[y] = temp;
    } else {
      int temp = row[x];
      row[x] = row[y];
      row[y] = temp;
    }
  }
  return 0;
}
