#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int n, m, k, x, y, **arr, *arr1, *arr2;
  char c;
  cin >> n >> m >> k;
  arr1 = new long long int[n], arr2 = new long long int[m],
  arr = new long long int*[n];
  for (int i = 0; i < n; i++) arr[i] = new long long int[m], arr1[i] = i;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> arr[i][j], arr2[j] = j;
  while (k--) {
    cin >> c;
    cin >> x >> y;
    x--, y--;
    if (c == 'g')
      cout << arr[arr1[x]][arr2[y]] << '\n';
    else if (c == 'c')
      swap(arr2[x], arr2[y]);
    else if (c == 'r')
      swap(arr1[x], arr1[y]);
  }
  return 0;
}
