#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int mat[n][m];
  for (long long int i = 0; i < n; i++)
    for (long long int j = 0; j < m; j++) cin >> mat[i][j];
  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;
  char q;
  long long int l, r, temp;
  while (k--) {
    cin >> q >> l >> r;
    if (q == 'c') {
      temp = col[l - 1];
      col[l - 1] = col[r - 1];
      col[r - 1] = temp;
    } else if (q == 'r') {
      temp = row[l - 1];
      row[l - 1] = row[r - 1];
      row[r - 1] = temp;
    } else
      cout << mat[row[l - 1]][col[r - 1]] << "\n";
  }
  return 0;
}
