#include <bits/stdc++.h>
using namespace std;
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long modexp(long long a, long long b, long long c) {
  long long ans = 1;
  a %= c;
  if (a == 0) {
    return 0;
  }
  while (b > 0) {
    if (b % 2) {
      ans = (ans * a) % c;
    }
    b /= 2;
    a = (a * a) % c;
  }
  return ans;
}
long long fact(long long n) {
  long long res = 1;
  for (long long i = 2; i <= n; i++) res = res * i;
  return res;
}
long long nCr(long long n, long long r) {
  return fact(n) / (fact(r) * fact(n - r));
}
long long nPr(long long n, long long r) { return fact(n) / fact(n - r); }
vector<long long> createsieve(long long n) {
  vector<long long> primes;
  vector<long long> sieve(n + 1);
  for (long long i = 2; i * i <= n; i++) {
    if (sieve[i] == 0) {
      for (long long j = i * i; j <= n; j += i) {
        sieve[j] = 1;
      }
    }
  }
  for (long long i = 2; i <= n; i++) {
    if (sieve[i] == 0) {
      primes.push_back(i);
    }
  }
  return primes;
}
int convertBinaryToDecimal(long long n) {
  int decimalNumber = 0, i = 0, remainder;
  while (n != 0) {
    remainder = n % 10;
    n /= 10;
    decimalNumber += remainder * pow(2, i);
    ++i;
  }
  return decimalNumber;
}
int gcd(int a, int b) {
  if (b > a) return gcd(b, a);
  return b == 0 ? a : gcd(b, a % b);
}
int main() {
  c_p_c();
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  long long b[n], c[m];
  for (int i = 0; i < n; i++) b[i] = i;
  for (int j = 0; j < m; j++) c[j] = j;
  while (k--) {
    char ch;
    long long x, y;
    cin >> ch >> x >> y;
    switch (ch) {
      case 'r':
        swap(b[x - 1], b[y - 1]);
        break;
      case 'c':
        swap(c[x - 1], c[y - 1]);
        break;
      case 'g':
        cout << a[b[x - 1]][c[y - 1]] << "\n";
        break;
    }
  }
  return 0;
}
