#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int PLATE[1001][1001];
int c[1001];
int r[1001];
char QUERY;
int a, b;
int main() {
  while (cin >> n >> m >> k) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) cin >> PLATE[i][j];
    for (int i = 1; i <= n; i++) r[i] = i;
    for (int i = 1; i <= m; i++) c[i] = i;
    for (int K = 1; K <= k; K++) {
      cin >> QUERY >> a >> b;
      if (QUERY == 'g') cout << PLATE[r[a]][c[b]] << endl;
      if (QUERY == 'r') swap(r[a], r[b]);
      if (QUERY == 'c') swap(c[a], c[b]);
    }
  }
}
