#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long i = 0, j = 0, n = 0, m = 0, k = 0, f = 0, c = 0, t = 0;
  string s;
  cin >> n >> m >> k;
  long long arr[n][m];
  vector<long long> col(m, 0), row(n, 0);
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      cin >> arr[i][j];
      col[j] = j;
    }
    row[i] = i;
  }
  long long a, b, a1, b1;
  for (i = 0; i < k; i++) {
    char ch;
    cin >> ch >> a >> b;
    --a;
    --b;
    if (ch == 'c') {
      a1 = col[a];
      b1 = col[b];
      col[a] = b1;
      col[b] = a1;
    }
    if (ch == 'r') {
      a1 = row[a];
      b1 = row[b];
      row[a] = b1;
      row[b] = a1;
    }
    if (ch == 'g') cout << arr[row[a]][col[b]] << "\n";
  }
  cerr << "[RT : " << clock() << "ms] ";
}
