#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<vector<int>> v(n, vector<int>(m));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> v[i][j];
  vector<int> row(n);
  for (int i = 0; i < n; i++) row[i] = i;
  vector<int> col(m);
  for (int i = 0; i < m; i++) col[i] = i;
  while (k--) {
    char ch;
    int x, y;
    cin >> ch >> x >> y;
    x--;
    y--;
    if (ch == 'r')
      swap(row[x], row[y]);
    else if (ch == 'c')
      swap(col[x], col[y]);
    else
      cout << v[row[x]][col[y]] << '\n';
  }
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return (0);
}
