#include <bits/stdc++.h>
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
using namespace std;
int a[1005][1005], rows[1005], columns[1005];
int n, m, k, xi, yi;
char c;
int main() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cerr.tie(NULL);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> a[i][j];
  for (int i = 0; i < n; i++) rows[i] = i;
  for (int j = 0; j < m; j++) columns[j] = j;
  while (k--) {
    cin >> c >> xi >> yi;
    xi--;
    yi--;
    switch (c) {
      case 'r':
        swap(rows[xi], rows[yi]);
        break;
      case 'c':
        swap(columns[xi], columns[yi]);
        break;
      default:
        cout << a[rows[xi]][columns[yi]] << '\n';
    }
  }
}
