#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M;
  long long test;
  long long arr[1003][1003];
  long long i, j;
  long long r[1003], c[1003];
  char ch;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> N >> M >> test;
  for (long long int i = 1; i < N + 1; i++) {
    for (long long int j = 1; j < M + 1; j++) {
      cin >> arr[i][j];
    }
  }
  for (long long int i = 1; i < N + 1; i++) r[i] = i;
  for (long long int i = 1; i < M + 1; i++) c[i] = i;
  for (long long int i = 0; i < test; i++) {
    long long x, y;
    cin >> ch >> x >> y;
    if (ch == 'g') {
      cout << arr[r[x]][c[y]] << "\n";
    } else if (ch == 'r') {
      swap(r[x], r[y]);
    } else
      swap(c[x], c[y]);
  }
  return 0;
}
