#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<int>> table(n, vector<int>(m, 0));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> table[i][j];
  vector<int> rowtable(n, 0);
  vector<int> coltable(m, 0);
  for (int i = 0; i < n; i++) rowtable[i] = i;
  for (int j = 0; j < m; j++) coltable[j] = j;
  string type;
  int x, y;
  while (q--) {
    cin >> type >> x >> y;
    x--;
    y--;
    if (type[0] == 'g')
      cout << table[rowtable[x]][coltable[y]] << "\n";
    else if (type[0] == 'c')
      swap(coltable[x], coltable[y]);
    else
      swap(rowtable[x], rowtable[y]);
  }
  return 0;
}
