#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long n, m, k;
    cin >> n >> m >> k;
    long long a[n][m];
    for (long long int i = 0; i < n; i++) {
      for (long long int j = 0; j < m; j++) cin >> a[i][j];
    }
    vector<long long int> row(n), col(m);
    for (long long int i = 0; i < n; i++) row[i] = i;
    for (long long int j = 0; j < m; j++) col[j] = j;
    for (long long int i = 0; i < k; i++) {
      char s;
      long long x, y;
      cin >> s >> x >> y;
      if (s == 'g') {
        cout << a[row[x - 1]][col[y - 1]] << '\n';
      }
      if (s == 'r') {
        long long temp = row[x - 1];
        row[x - 1] = row[y - 1];
        row[y - 1] = temp;
      }
      if (s == 'c') {
        long long temp1 = col[x - 1];
        col[x - 1] = col[y - 1];
        col[y - 1] = temp1;
      }
    }
  }
  return 0;
}
