#include <bits/stdc++.h>
using namespace std;
int n, m, k, t, a[1123][1123], x, y, cols[1213], rows[1123];
char c;
int main() {
  ios_base::sync_with_stdio(false);
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) scanf("%d", &a[i][j]);
  for (int i = 1; i <= n; ++i) rows[i] = i;
  for (int i = 1; i <= m; ++i) cols[i] = i;
  while (k--) {
    scanf(" %c %d %d", &c, &x, &y);
    if (c == 'c')
      t = cols[x], cols[x] = cols[y], cols[y] = t;
    else if (c == 'r')
      t = rows[x], rows[x] = rows[y], rows[y] = t;
    else
      printf("%d\n", a[rows[x]][cols[y]]);
  }
}
