#pragma region head
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using pi = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
using vv = vector<vector<T>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define rrepi(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define bit(n) (1LL << (n))
template <class T>
inline bool chmax(T& a, const T& b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
inline bool chmin(T& a, const T& b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
const int INF = 1002003004;
const ll LINF = 1002003004005006007ll;
struct preprocess {
    preprocess() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(20);
    }
} ____;
#pragma endregion head

#pragma region library
const int MOD = 998244353;
struct mint {
    ll x;  // typedef long long ll;
    mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
    mint operator-() const { return mint(-x); }
    mint& operator+=(const mint a) {
        if ((x += a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += MOD - a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint& operator*=(const mint a) {
        (x *= a.x) %= MOD;
        return *this;
    }
    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }
    // for prime MOD
    mint inv() const {
        return pow(MOD - 2);
    }
    mint& operator/=(const mint a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
    bool operator==(const mint a) const {
        return x == a.x;
    }
    bool operator!=(const mint a) const {
        return x != a.x;
    }
    friend ostream& operator<<(ostream& os, const mint& value) {
        os << value.x;
        return os;
    }
    friend istream& operator>>(istream& is, mint& value) {
        ll t;
        is >> t;
        value = mint(t);
        return is;
    }
};

#pragma endregion library

int main() {
    int h, w, k;
    cin >> h >> w >> k;
    vv<char> cs(h, vector<char>(w, '#'));
    rep(i, k) {
        int h, w;
        char c;
        cin >> h >> w >> c;
        h--;
        w--;
        cs[h][w] = c;
    }
    mint three = 3, p = three.pow(h * w - k);
    mint div3 = (mint)1 / 3;
    vv<mint> dp(h, vector<mint>(w));
    dp[0][0] = p;
    rep(i, h) rep(j, w) {
        if (cs[i][j] == '#') {
            if (i < h - 1) {
                dp[i + 1][j] += dp[i][j] * 2 * div3;
            }
            if (j < w - 1) {
                dp[i][j + 1] += dp[i][j] * 2 * div3;
            }
        }
        if (cs[i][j] == 'X') {
            if (i < h - 1) {
                dp[i + 1][j] += dp[i][j];
            }
            if (j < w - 1) {
                dp[i][j + 1] += dp[i][j];
            }
        }
        if (cs[i][j] == 'R') {
            if (j < w - 1) {
                dp[i][j + 1] += dp[i][j];
            }
        }
        if (cs[i][j] == 'D') {
            if (i < h - 1) {
                dp[i + 1][j] += dp[i][j];
            }
        }
    }
    cout << dp[h - 1][w - 1] << '\n';
}

#pragma GCC optimize ("O2")
#pragma GCC target ("avx")
#include<bits/stdc++.h>
//#include<atcoder/all>
//using namespace atcoder;

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

int dp[2001];
char S[4002000], c;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	int H = 0, W = 0;
	while ((c = getchar()) >= '0') H = H * 10 + c - '0';
	while ((c = getchar()) >= '0') W = W * 10 + c - '0';
	fread(S, 1, H * (W + 1), stdin);

	auto s = S + (H - 1) * (W + 1);
	dp[W - 1] = 44 - s[W - 1];
	for (int j = W - 2; j >= 0; j--) {
		dp[j] = 44 - s[j] - dp[j + 1];
	}

	for (int i = H - 2; i >= 0; i--) {
		s = S + i * (W + 1);
		dp[W - 1] = 44 - s[W - 1] - dp[W - 1];

		for (int j = W - 2; j >= 0; j--) {
			dp[j] = 44 - s[j] - max(dp[j], dp[j + 1]);
		}
	}

	if (S[0] == '+') dp[0]--;
	else dp[0]++;

	if (dp[0] < 0) co("Takahashi");
	else if (dp[0] > 0) co("Aoki");
	else co("Draw");

	Would you please return 0;
}