#include<bits/stdc++.h>

using namespace std;

#define pb push_back
#define sz(x) ((int)x.size())
#define all(x) x.begin(), x.end()
typedef vector<int> vi;
using ll = long long;
typedef pair<int, int> pii;
typedef unsigned long long ul;

const int mn = 200005;
const int mk = 302;
const int mod = 998244353;
int n, k;
ll a[mn][mk];
ll s[mk];

ll powmod(ll a, ll b, ll P) {
	ll t = 1;
	for (; b; b >>= 1, a = a * a % P)
		if (b & 1) t = t * a % P;
	return t;
}

ll C[mk][mk];

inline void modp(ll &ans) {
	ans %= mod;
	if (ans < 0) ans += mod;
}

ll inv2 = 499122177;

int main() {
	//cin.sync_with_stdio(0);
#ifdef LOCAL
	freopen("../1.txt", "r", stdin);
	//freopen("../2.txt", "w", stdout);

	auto st = chrono::system_clock::now();
#endif

	C[0][0] = 1;
	for (int i = 1; i <= 300; i++) {
		C[i][0] = 1;
		for (int j = 1; j <= i; j++) {
			C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
		}
	}

	scanf("%d%d", &n, &k);
	for (int i = 1; i <= n; i++) {
		a[i][0] = 1;
		s[0] += 1;
		scanf("%lld", &a[i][1]);
		s[1] += a[i][1];
		for (int j = 2; j <= k; j++) {
			a[i][j] = a[i][1] * a[i][j - 1] % mod;
			s[j] += a[i][j];
		}
	}
	for (int i = 1; i <= k; i++) s[i] %= mod;


	for (int x = 1; x <= k; x++) {
		ll ans = 0;
		for (int i = 0; i <= x; i++) {
			ll sum = (s[i] * s[x - i] - s[x]) % mod * C[x][i] % mod;
			ans += sum;
		}
		ans %= mod;
		ans *= inv2;
		modp(ans);
		printf("%lld\n", ans);
	}

#ifdef LOCAL
	auto ed = chrono::system_clock::now();
	auto diff = std::chrono::duration_cast<std::chrono::milliseconds>(ed - st);
	std::cerr << "cost time " << diff.count() << "ms." << std::endl;
#endif
	return 0;
}

#include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
// using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define rrep1(i, n) for (int i = n; i >= 1; i--)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define eb emplace_back
#define fi first
#define se second
#define sz(x) (int)(x).size()
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
typedef long long int ll;
typedef pair<int, int> P;
// typedef modint1000000007 mint;

void speedUpIO() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
}

template <class T> bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> bool chmin(T &a, const T &b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}
/*--------------------------------------------------*/
const int INF = 1e9;
const ll LINF = 1e18;
const int MAX = 100010;

void solve() {
    int h, w;
    cin >> h >> w;
    VV<int> G(h + 1, V<int>(w + 1));
    rep(i, h) rep(j, w) {
        char c;
        cin >> c;
        G[i][j] = c == '+' ? 1 : -1;
    }
    VV<int> dp(h + 1, V<int>(w + 1, -INF));
    rep(i, h) dp[i][w] = INF;
    rep(j, w) dp[h][j] = INF;
    dp[h - 1][w - 1] = 0;
    rrep(i, h) rrep(j, w) {
        if (i == h - 1 && j == w - 1) continue;
        chmax(dp[i][j], G[i + 1][j] - dp[i + 1][j]);
        chmax(dp[i][j], G[i][j + 1] - dp[i][j + 1]);
    }
    string ans = "Draw";
    if (dp[0][0] > 0) ans = "Takahashi";
    if (dp[0][0] < 0) ans = "Aoki";
    cout << ans << "\n";
}

int main() {
    speedUpIO();
    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
        // cout << solve() << "\n";
        // cout << (solve() ? "Yes" : "No") << "\n";
        // cout << fixed << setprecision(15) << solve() << "\n";
    }
    return 0;
}
