#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
char dir[4] = {'D', 'R', 'U', 'L'};
const long long maxN = 1e3 + 5;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<vector<long long> > v(n, vector<long long>(m));
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      cin >> v[i][j];
    }
  }
  vector<long long> row(n), col(m);
  for (long long i = 0; i < n; i++) row[i] = i;
  for (long long i = 0; i < m; i++) col[i] = i;
  while (k--) {
    char c;
    long long a, b;
    cin >> c >> a >> b;
    a--, b--;
    if (c == 'c') swap(col[a], col[b]);
    if (c == 'r') swap(row[a], row[b]);
    if (c == 'g') cout << v[row[a]][col[b]] << "\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(5);
  long long T = 1;
  while (T--) {
    solve();
  }
}
