#include <bits/stdc++.h>
using namespace std;
int n, m, k, p[1005][1005];
int pos_x[1005], pos_y[1005];
char flag;
int a, b;
int main() {
  while (cin >> n >> m >> k) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) scanf("%d", &p[i][j]);
    for (int i = 1; i <= n; i++) pos_x[i] = i;
    for (int i = 1; i <= m; i++) pos_y[i] = i;
    while (k--) {
      cin >> flag >> a >> b;
      if (flag == 'c')
        swap(pos_y[a], pos_y[b]);
      else if (flag == 'r')
        swap(pos_x[a], pos_x[b]);
      else if (flag == 'g')
        printf("%d\n", p[pos_x[a]][pos_y[b]]);
    }
  }
  return 0;
}
