#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-9;
const int MAXN = 10 * 100007;
int a[1024][1024];
int n, m, k;
int w[1024];
int h[1024];
int main() {
  cin >> n >> m >> k;
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j) cin >> a[i][j];
  for (long long i = 0; i < 1024; ++i) w[i] = h[i] = i;
  for (long long query = 0; query < k; ++query) {
    char c;
    int x, y;
    cin >> c >> x >> y;
    if (c == 'c') swap(h[x], h[y]);
    if (c == 'r') swap(w[x], w[y]);
    if (c == 'g') cout << a[w[x]][h[y]] << endl;
  }
}
