#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("branch-target-load-optimize")
#pragma GCC optimize("btr-bb-exclusive")
#pragma GCC optimize("data-sections")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("no-stack-protector")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> rows(n), columns(m);
  for (int i = 0; i < n; ++i) rows[i] = i;
  for (int i = 0; i < m; ++i) columns[i] = i;
  vector<vector<int>> table(n, vector<int>(m));
  for (auto& line : table)
    for (int& num : line) cin >> num;
  for (int i = 0; i < k; ++i) {
    char s;
    int x, y;
    cin >> s >> x >> y;
    x--;
    y--;
    if (s == 'r')
      swap(rows[x], rows[y]);
    else if (s == 'g')
      cout << table[rows[x]][columns[y]] << '\n';
    else
      swap(columns[x], columns[y]);
  }
  cout << flush;
  return 0;
}
