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