#include<bits/stdc++.h>
using namespace std;
#define _rep(i, x, y) for(int i = (int)x; i < (int)y; ++i)
#define _dep(i,x,y) for(int i = (int)x; i > (int)y; i--)
#define PII pair<int,int>
#define eb emplace_back
#define pb push_back
#define fi first
#define se second
#define PQ priority_queue
#define lb lower_bound
#define ub upper_bound
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VII;
typedef vector<ll> VL;
typedef vector<vector<ll>> VLL;
constexpr int mod = 1e9 + 7;
constexpr int KINF = 0x3f3f3f3f;
constexpr double eps = 1e-7;
int main(){
	ios::sync_with_stdio(false); cin.tie(0);
	int n, m;
	cin >> n >> m;
	VI a(m), b(m);
	_rep(i, 0, m) cin >> a[i] >> b[i], -- a[i], -- b[i];
	VI c(n);
	_rep(i, 0, n) cin >> c[i];
	VII edge(n, VI(n));
	VII g(n);
	_rep(i, 0, m){
		if(c[a[i]] > c[b[i]])
			edge[a[i]][b[i]] = 1;
		else if(c[b[i]] > c[a[i]])
			edge[b[i]][a[i]] = 1;
		else{
			g[a[i]].eb(b[i]);
			g[b[i]].eb(a[i]);
		}
	}
	VI vis(n), dfn(n);
	int rk = 0;
	function<void(int, int)> dfs = [&](int u, int fa){
		dfn[u] = rk ++;
		vis[u] = 1;
		for(int& v : g[u]){
			if(!vis[v]){
				dfs(v, u);
				edge[u][v] = 1;
			}
			else{
				if(v == fa) continue;
				if(dfn[v] < dfn[u]) edge[u][v] = 1;
			}
		}
	};
	_rep(i, 0, n)
		if(!vis[i]) dfs(i, -1);
	_rep(i, 0, m){
		if(edge[a[i]][b[i]]) cout << "->" << endl;
		else cout << "<-" << endl;
	}
	return 0;
} 
// 注意int转long long会溢出



#include <bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i = (l); i <= (r); ++i)
typedef long long ll;
void fast() {
	ios::sync_with_stdio (0);
	cin.tie (0); cout.tie (0);
}

int a[2];
int main() {
	fast();
	cin >> a[0] >> a[1];
	int c;
	cin >> c; int p = c;
	while (a[p] >= 0) {
		--a[p];
		p ^= 1;
	}
	cout << ((p == 0) ? ("Aoki") : ("Takahashi ")) << '\n';
	return 0;
}

