#include <bits/stdc++.h>
#define N 130
using namespace std;
int n, m, i, j, k, v, h[N], u[N];
char s[N];
struct AB{
    int a, b, n;
} d[N];
void cun(int a, int b){
    d[++k].a = a, d[k].b = b;
    d[k].n = h[a], h[a] = k;
}
int dfs(int a, int c){
    int b, i, s=c^1;
    for(i=h[a]; i&&s!=c; i=d[i].n){
        if(u[i]) continue;
        u[i] = b = d[i].b;
        if(c) s = max(s, dfs(b, c^1));//1希望是1
        else s = min(s, dfs(b, c^1));//0希望是0
        u[i] = 0;
    }//达到目的s==c,剪枝退出循环
    return s;
}//0是先手赢,1是后手赢
int main(){
    scanf("%d", &n);
    for(i=1; i<=n; i++){
        scanf("%s", s);
        j = strlen(s);
        cun(s[0], s[j-1]);
    }//以字母为点,单词为边构图
    for(v=i='a'; i<='z'&&v; i++){
        if(!h[i]) continue;
        v = min(v, dfs(i, 0));
    }//先手可以任选起点,多种选择取最小
    printf("%s\n", v?"Second":"First");
    return 0;
}

作者 crxis

发表回复