Problem:
Score : 500 points

Problem Statement

There is a string s of length 3 or greater.
No two neighboring characters in s are equal.

Takahashi and Aoki will play a game against each other.
The two players alternately performs the following operation, Takahashi going first:

Remove one of the characters in s, excluding both ends. However, a character cannot be removed if removal of the character would result in two neighboring equal characters in s.

The player who becomes unable to perform the operation, loses the game. Determine which player will win when the two play optimally.

Constraints

3 ≤ |s| ≤ 10^5

s consists of lowercase English letters.

No two neighboring characters in s are equal.

Input

The input is given from Standard Input in the following format:

s

Output

If Takahashi will win, print First. If Aoki will win, print Second.

Sample Input 1

aba

Sample Output 1

Second

Takahashi, who goes first, cannot perform the operation, since removal of the b, which is the only character not at either ends of s, would result in s becoming aa, with two as neighboring.

Sample Input 2

abc

Sample Output 2

First

When Takahashi removes b from s, it becomes ac.
Then, Aoki cannot perform the operation, since there is no character in s, excluding both ends.

Sample Input 3

abcab

Sample Output 3

First

Solution in C (GCC 5.4.1) (judge verdict: Wrong Answer)

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // int64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int get_str(char *str, int size)
{
    char format[100];
    if (size == 0)
        return 0;
    snprintf(format, sizeof(format), "%%%ds", size);
    scanf(format, str);
    return 0;
}
#define NUM_MAX 100000

int desc(const void *a1, const void *a2) {
    return *(int*)a2 - *(int*)a1;
}

int main(void) {
    static char str[NUM_MAX+5];
    get_str(str, NUM_MAX+5);
    int len = strlen(str);
    // winner => If odd: first, If even: second
    int win = (len+1)%2; // 0: first, 1: second

    static int map[26];
    int i;
    for(i = 0; i < len; i++) {
        map[str[i] - 'a']++;
    }
    static int sorted[26];
    memcpy(sorted, map, sizeof(int)*26);
    qsort(sorted, 26, sizeof(int), desc);
    // if(len==3) {
    //     if(sorted[0] == 2) win = 1;
    // } else 
    if(len%2 == 0) {
        // First player no longer take
        // if(sorted[0] == len/2 && sorted[1] == len/2) win = 1;
    } else {
        // odd
        // First player no longer take
        // if(sorted[0] == (len/2 + 1) && sorted[1] == len/2) {
        //     win = 1;
        // }
        if(str[0] == str[len-1]) win = 1;
        // anyway, First player wins.
        // else if(sorted[0] == len/2 && sorted[1] == len/2) {
        //     // abcab
        //     for(i = 0; i < 26; i++) {
        //         if(map[i]==1) break;
        //     }
        //     char ch = i+'a';
        //     if(str[0] != ch && str[len-1] != ch) win = 0;
        // }
    }
    printf("%s\n", win==0 ? "First" : "Second");
    return 0;
}