#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,mmx,avx")
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
#define endl "\n"
#define fst first
#define snd second
const int UNDEF = -1;
const int INF=1<<30;
template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, true : false; }
template<typename T> inline bool chkmin(T &aa, T bb) { return aa > bb ? aa = bb, true : false; }
typedef pair<ll,ll> pll;typedef vector<ll> vll;typedef pair<int,int> pii;typedef vector<int> vi;typedef vector<vi> vvi;typedef vector<pii> vpii;typedef vector<pll> vpll;
template<typename T> void makeunique(vector<T> &vx) {sort(vx.begin(),vx.end());auto it=unique(vx.begin(),vx.end());vx.resize(std::distance(vx.begin(),it));}


int h[128];

int win(int x, int y) {
	if ((x+1)%3==y) return x;
	else return y;
}

void solve(int n, int klim, std::string inp){
	memset(h,-1,sizeof h);
	h['R']=0; h['S']=1; h['P']=2;
	vi a[2];
	a[0].resize(n);a[1].resize(n);
	for (int i=0;i<n;i++) a[0][i]=h[inp[i]];
	
	int cur=0,nxt=1;
	for (int k=0;k<klim;k++) {
		for (int i=0;i<n;i++) {
			a[nxt][i]=win(a[cur][(i*2)%n],a[cur][((i*2)+1)%n]);
		}
		swap(cur,nxt);
	}
	char ans;
	for (int x=0;x<128;x++) if (h[x]==a[cur][0]) ans=x;
	printf("%c\n",ans);
}

// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long n;
    scanf("%lld",&n);
    long long k;
    scanf("%lld",&k);
    std::string s;
    std::cin >> s;
    solve(n, k, s);
    return 0;
}

/*@author Vipen Loka*/
#include <bits/stdc++.h>
#define endl '\n'
#define ff first
#define ss second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define vvi vector < vi >
#define pii pair<int,int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001;
#define deb(x) cout << #x << ':' << x << '\n';
#define int long long
using namespace std;
template<class T>void show(vector<T> &a) {cerr << "[ "; for (int ij = 0; ij < (int)a.size(); ij++) {cerr << a[ij] << " ";} cerr << "]\n";}
template<class T>void show(T a) {cerr << a << endl;}

int r, c;
int mat[2005][2005], dp[2005][2005];
bool visited[2005][2005];

int find(int x, int y) {
	if (x == r - 1 && y == c - 1) {
		return 0;
	}
	if (visited[x][y]) {
		return dp[x][y];
	}
	visited[x][y] = 1;
	int res = -1e9;
	if (x + 1 < r) {
		res = max(res, mat[x + 1][y] - find(x + 1, y));
	}
	if (y + 1 < c) {
		res = max(res, mat[x][y + 1] - find(x, y + 1));
	}
	dp[x][y] = res;

	return res;
}

void solve() {
	int i, j;
	cin >> r >> c;

	for (int i = 0; i < r; ++i)
	{
		for (int j = 0; j < c; ++j)
		{
			char t; cin >> t;
			mat[i][j] = (t == '+') ? 1 : -1;
		}
	}

	int ans = find(0, 0);

	if (ans > 0) {
		cout << "Takahashi" << endl;
	}
	else if (ans < 0) {
		cout << "Aoki" << endl;
	}
	else {
		cout << "Draw" << endl;
	}


}


int32_t main(int32_t argc, char *argv[]) {
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int T = 1;
	// cin >> T;
	while (T--) {
		solve();
	}
	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
}