#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, t, input;
  cin >> n >> m >> t;
  std::vector<vector<int>> v(n);
  for (int i = 0; i <= n - 1; i++) {
    for (int j = 0; j <= m - 1; j++) {
      cin >> input;
      v[i].push_back(input);
    }
  }
  for (int i = 0; i <= t - 1; i++) {
    char b;
    long long x, y;
    cin >> b >> x >> y;
    if (b == 'g') {
      cout << v[x - 1][y - 1] << "\n";
    } else if (b == 'c') {
      for (int i = 0; i <= n - 1; i++) {
        swap(v[i][x - 1], v[i][y - 1]);
      }
    } else {
      swap(v[x - 1], v[y - 1]);
    }
  }
  cerr << "Time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
  return 0;
}
