#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int mod = 1000000007;
const int INF = 1000000000;
const int N = 1005;
using namespace std;
int n, k;
int a[N];
int b[N];
int mas[N][N];
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> mas[i][j];
    }
  }
  for (int i = 0; i < n; ++i) a[i] = i;
  for (int j = 0; j < m; ++j) b[j] = j;
  string s;
  int x, y;
  for (int i = 0; i < k; ++i) {
    cin >> s;
    cin >> x >> y;
    if (s == "c") {
      swap(b[x - 1], b[y - 1]);
    } else if (s == "r") {
      swap(a[x - 1], a[y - 1]);
    } else {
      cout << mas[a[x - 1]][b[y - 1]] << endl;
    }
  }
  return 0;
}
