#include <bits/stdc++.h>

#define ms(a,b) memset(a, b, sizeof(a))
#define rep(a,b,c) for(int a = (int)(b); a < (int)(c); a++)
#define fi first
#define se second
#define pb push_back
#define pf push_front
#define m_p(a,b) make_pair(a, b)
#define lson l,mid,o << 1
#define rson mid + 1,r,o << 1 | 1
#define ls o << 1
#define rs o << 1 | 1
#define inf 0x3f3f3f3f

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef pair<int,int> pii;

inline bool isdigit(char& ch) {
    return ch >= '0' && ch <= '9';
}
template<class T>
void read(T &x) {
    x = 0;
    ll f = 1;char ch = getchar();
    for (;!isdigit(ch);ch = getchar()) 
        if (ch == '-') f = -1;
    for (; isdigit(ch);ch = getchar())
        x = (x << 1) + (x << 3) + ch - '0';
    x *= f;
}
template<class T>
inline void write(T x) {
    if (x == 0) {putchar('0');return ;}
    if (x < 0) {putchar('-');x = -x;}
    int _stk[65],_top = 0;
    for (;x;x /= 10) _stk[++_top] = x % 10 + 48;
    for (;_top;_top--)putchar(_stk[_top]);
}

const int MAXN = 2e5 + 100;

int f[MAXN][7];
int n;
string S, X;

bool dp(int i, int j) {
    if (i == n + 1)
        return (j == 0);
    if (~f[i][j])
        return f[i][j];
    if (X[i] == 'T')
        f[i][j] = (dp(i + 1, j * 10 % 7) | dp(i + 1,(j * 10 + S[i] - '0') % 7));
    else
        f[i][j] = (dp(i + 1, j * 10 % 7) & dp(i + 1,(j * 10 + S[i] - '0') % 7));
    return f[i][j];
}

int main () {
    cin >> n >> S >> X;
    S = ' ' + S;
    X = ' ' + X;    
    ms(f, -1);
    if (dp(1, 0))
        cout << "Takahashi";
    else
        cout << "Aoki";
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) begin(v),end(v)
template<typename A, typename B> inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; }
template<typename A, typename B> inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; }
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 1000000007;
constexpr bool debug = false;
//---------------------------------//

int main() {
	int N, M, K;
	cin >> N >> M >> K;
	vector<int> A(K);
	REP(i, K) cin >> A[i];
	vector<bool> inA(N);
	for (int a : A) inA[a] = true;
	
	{
		int p = 0;
		while (p < N) {
			bool update = false;
			for (int i = M; i >= 1; --i) {
				if (p + i < N && inA[p + i]) continue;
				update = true;
				p += i;
				break;
			}
			if (!update) { puts("-1"); return 0; }
		}
	}
	
	vector<double> dp0(N + 1), dp(N + 1);
	double s0 = 0, s = 0;
	for (int i = N - 1; i >= 0; --i) {
		if (i + M + 1 <= N) { s0 -= dp0[i + M + 1] / M; s -= dp[i + M + 1] / M; }
		
		if (inA[i]) { dp0[i] = 1; dp[i] = 0; }
		else { dp0[i] = s0; dp[i] = s + 1; }
		
		s0 += dp0[i] / M;
		s += dp[i] / M;
	}
	
	double ans = dp[0] / (1 - dp0[0]);
	printf("%.16f\n", ans);
}