#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
using P = pair<int,int>;
#define F first
#define S second
#define MOD 1e9+7
const int inf = 1e9;
 
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int a, b, c;
    cin >> a >> b >> c;
    ll A = abs(a), B = abs(b);
    if(c%2==0){
        if(A > B) cout << ">" << endl;
        else if(A < B) cout << "<" << endl;
        else cout << "=" << endl;
    }else{
        if(a > b) cout << ">" << endl;
        else if(a < b) cout << "<" << endl;
        else cout << "=" << endl;

    }
    return 0;
}
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<queue>
#include<functional>
#include<set>

using namespace std;

typedef long long ll;

int N;
string S, X;

int dp[200000 + 100][7];//dp[i][j] := 1-idxでi桁目まで作ったときに、余りがjの時のgrundy数
//0なら高橋の勝ち

int memo(int digit, int mod) {
	//digitは0-idx
	if (digit == N) {
		if (mod == 0)return dp[digit][mod] = 0;
		else return dp[digit][mod] = 1;
	}
	if (dp[digit][mod] != -1)return dp[digit][mod];

	int ret = -1;
	if (X[digit] == 'A') {
		//Tを勝たせたくない　遷移先のどれかに0以外があればOK
		
		//0を追加
		int add0 = memo(digit + 1, (mod * 10) % 7);
		//S[i]を追加
		int addSi = memo(digit + 1, (mod * 10 + (S[digit] - '0')) % 7);
		if (add0 != 0 || addSi != 0)
			ret = 1;
		else
			ret = 0;
	}
	else {
		//Tなので勝ちたい。遷移先のどれかに0があればOK

		//0を追加
		int add0 = memo(digit + 1, (mod * 10) % 7);
		//S[i]を追加
		int addSi = memo(digit + 1, (mod * 10 + (S[digit] - '0')) % 7);

		if (add0 == 0 || addSi == 0)
			ret = 0;
		else 
			ret = 1;

	}

	return dp[digit][mod] = ret;
}

int main() {
	cin >> N >> S >> X;
	for (int i = 0; i <= N; i++)for (int j = 0; j < 7; j++)dp[i][j] = -1;

	int ret = memo(0, 0);

	if (ret == 0)cout << "Takahashi" << endl;
	else cout << "Aoki" << endl;

	return 0;
}