#include <bits/stdc++.h>
using namespace std;
long long mat[1001][1001];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, k;
  cin >> n >> m >> k;
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++) cin >> mat[i][j];
  long long r[1001], c[1001];
  for (long long i = 0; i < 1001; i++) {
    r[i] = i;
    c[i] = i;
  }
  while (k--) {
    char s;
    long long x, y;
    cin >> s >> x >> y;
    if (s == 'c') {
      long long t = c[x - 1];
      c[x - 1] = c[y - 1];
      c[y - 1] = t;
    } else if (s == 'r') {
      long long t = r[x - 1];
      r[x - 1] = r[y - 1];
      r[y - 1] = t;
    } else {
      cout << mat[r[x - 1]][c[y - 1]] << "\n";
    }
  }
}
