stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

string s;

int main() {

  cin >> s;

  int l = s.size();

  if(s[0] == s[l-1]) {

    if((l - 2) % 2)printf("Second\n");

    else printf("First\n");

  }

  else {

    if((l - 2) % 2) printf("First\n");

    else printf("Second\n");

  }

}


// Faster C++ solution for the same problem (measured speedup: 5.29192402884586x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
//#include <bits/stdc++.h>

#include <stdio.h>

#include <iostream>

#include <string.h>

#include <math.h>

#include <stdlib.h>

#include <limits.h>

#include <algorithm>

#include <queue>

#include <vector>

#include <set>

#include <map>

#include <stack>

#include <bitset>

#include <string>

#include <time.h>

using namespace std;

long double esp=1e-11;

//#pragma comment(linker, "/STACK:1024000000,1024000000")

#define fi first

#define se second

#define all(a) (a).begin(),(a).end()

#define cle(a) while(!a.empty())a.pop()

#define mem(p,c) memset(p,c,sizeof(p))

#define mp(A, B) make_pair(A, B)

#define pb push_back

#define lson l , m , rt << 1

#define rson m + 1 , r , rt << 1 | 1

typedef long long int LL;

const long double PI = acos((long double)-1);

const LL INF=0x3f3f3f3f3f3f3f3fll;

const int MOD =1000000007ll;

const int maxn=210100;

char s[maxn];

int main()

{

    //freopen("in9.txt", "r", stdin);

    //freopen("in9.txt", "r", stdin);

    //freopen("out9.txt", "w", stdout);

    //::iterator iter;                  %I64d

    //for(int x=1;x<=n;x++)

    //for(int y=1;y<=n;y++)

    //scanf("%d",&a);

    //printf("%d\n",ans);

    scanf("%s",s);

    int n=strlen(s);

    int f=1;

    for(int x=0;x<n-2;x++)

        if(s[x]!=s[x+2])

        {

            f=0;

            break;

        }

    if(f==1)

    {

        printf("Second\n");

        return 0;

    }

    if(s[0]==s[n-1])n--;

    if(n&1)printf("First\n");

    else printf("Second\n");

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.251518371204538x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

string s;

int l;

int main() {

	cin>>s;

	l = s.length();

	if (s[0] == s[l - 1]) {

		if (l % 2 == 0) cout<<"First"; else cout<<"Second";

	} else {

		if (l % 2 == 0) cout<<"Second"; else cout<<"First";

	}

}

// Faster C++ solution for the same problem (measured speedup: 5.302546549918225x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



const int maxn=1e5+7;



char s[maxn];



int main()

{

	int i,j;

	scanf("%s",s);

	int n=strlen(s);

	if(n%2==0)

	{

		if(s[0]==s[n-1])

		  printf("First");

		else printf("Second");

	}

	else

	{

		if(s[0]==s[n-1])

		  printf("Second");

		else printf("First");

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.251425510300873x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

const int maxn=  1e5+10;

char s[maxn];

int main (void) {

    scanf ("%s", s);

    int len = strlen (s);

    if (s[0] == s[len-1]) len--;

    if (len % 2 == 1) printf ("First\n");

    else printf ("Second\n");

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.250291261216387x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:


#include<bits/stdc++.h>

#define MEM(a,x) memset(a,x,sizeof(a))

#define MEMINF(a) memset(a,0x3f,sizeof(a))

using namespace std;

typedef long long LL;

const int MAXN=2e5 + 10;

const int INF=0x3f3f3f3f;

const int MOD=1000000007;

int main() {

  LL len;

  string s;

  cin >> s;

  len = s.length();

  if ((len%2 == 0) ^ (s[0] == s[len-1]))

    cout << "Second" << endl;



  else   cout  << "First" << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.312511754703711x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <cstdio>

#include <cstring>

#include <cmath>

#include <queue>

#include <vector>

#include <time.h>

#include <string>

#include <stack>

#include <set>

#include <map>

#include <iostream>

#include <bitset>

#include <algorithm>

using namespace std;

#define MP make_pair

#define PB push_back

#define ms(a,b) memset((a),(b),sizeof(a))

typedef long long LL;

typedef unsigned long long uLL;

typedef pair<int, int> Pii;

typedef vector<int> Vi;

typedef vector<Pii> Vii;

const int inf = 0x3f3f3f3f;

const LL INF = (1uLL << 63) - 1;

const LL mod = 1000000007;

const int N = 150 + 5;

const double Pi = acos(-1.0);

const int maxn = 100005;

using namespace std;

char s[maxn];

int main() {

#ifdef local

    freopen("in","r",stdin);

#endif

    cin>>s;

    int len = strlen(s);

    int sf = len - 2;

    if(s[0] == s[len - 1]){

        sf++;

        if(sf&1){

            cout<<"First"<<endl;

        }

        else cout<<"Second"<<endl;

    }

    else {

        if(sf&1){

            cout<<"First"<<endl;

        }

        else cout<<"Second"<<endl;

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.315132409660806x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cstring>

#include <algorithm>

using namespace std;



char s[100010];



int main () {

    cin >> s;

    int len = strlen (s);

    if (s[0] == s[len - 1]) {

        if (len % 2 == 0) {

            cout << "First" << endl;

        } else {

            cout << "Second" << endl;

        }

    } else {

        if (len % 2 == 0) {

            cout << "Second" << endl;

        } else {

            cout << "First" << endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.314664589314725x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



#define X first

#define Y second

#define LL long long

#define ULL unsigned long long

#define PB push_back

#define MP make_pair

#define VI vector<int>

#define PII pair<int,int>

#define IOS ios::sync_with_stdio(0);cin.tie(0);

#define IN freopen("in", "r", stdin);

#define OUT freopen("out", "w", stdout);



const int maxn=100010;



char s[maxn];



int main()

{

	IOS;

	cin>>s;

	int n=strlen(s);

	bool ans=0;

	if (s[0]!=s[n-1]) ans^=1;

	ans^=(bool)(n%2);

	if (ans) cout<<"Second"<<endl;

	else cout<<"First"<<endl;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.3887217985769365x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <algorithm>

#include <queue>

#include <cmath>

#include <stack>

#include <map>

#include <set>

#include <utility>

#include <cstring>

#include <vector>

#define rep(i,n) for(ll i=1;i<=n;i++)

#define repn(i,n) for(ll i=n;i>=1;i--)

#define ll long long

#define mt(a,x) memset(a,x,sizeof(a))

const ll mod = 1e9+7;

const ll maxn = 1000050;

using namespace std;

int main()

{

    //freopen("data","r",stdin);

    ios::sync_with_stdio(0);

    string s;

    while(cin>>s)

    {

        int num = s.length();

        if(s[0]==s[num-1])

        {

            if(num&1) cout<<"Second"<<endl;

            else cout<<"First"<<endl;

        }

        else

        {

            if(num&1) cout<<"First"<<endl;

            else cout<<"Second"<<endl;

        }

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.431927762798439x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <cstdio>

#include <cstring>

#include <cmath>

#include <set>

#include <utility>

#include <vector>

#include <map>

#include <queue>

#include <stack>

const int inf=0x3f3f3f3f;

const double PI=acos(-1.0);

const double EPS=1e-10;

using namespace std;

typedef long long ll;

typedef pair<int,int> P;



char str[100050];

int len;

int main()

{

    //freopen("input.txt","r",stdin);

    scanf("%s",str+1);

    len=strlen(str+1);

    //

    if(str[1]==str[len])

    {

        len-=2;

        if(len%2==1) printf("Second\n");

        else printf("First\n");

    }

    else

    {

        len-=2;

        if(len%2==1) printf("First\n");

        else printf("Second\n");

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.253218295449213x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <stdio.h>

#include <cstdlib>

#include <algorithm>

#include <cmath>

#include <cstring>

#include <stack>

#include <map>

#include <set>

#include <string>

#include <vector>

#include <queue>

#include <bitset>

#define ms(A, B) memset(A, B, sizeof(A))

using namespace std;

typedef long long LL;

typedef pair<int, int> pii;

const int INF = 0x7fffffff;

const int N = 1e5 + 10;



char s[N];



int main() {

#ifdef local

    freopen("case.in", "r", stdin);

#endif

    scanf("%s", s);

    int len = strlen(s);

    bool flag = true;

    for (int i = 0; i < len - 2; i++) {

        if (s[i] != s[i + 2]) {

            flag = false;

            break;

        }

    }

    if (flag) {

        puts("Second");

        return 0;

    }

    if (len & 1) {

        if (s[0] == s[len-1])

            puts("Second");

        else

            puts("First");

    }

    else {

        if (s[0] == s[len-1])

            puts("First");

        else

            puts("Second");

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.250360099688785x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <stdio.h>

#include <string.h>

#include <iostream>

#include <algorithm>

#include <queue>

#include <vector>

#include <string>

#include <set>

#include <map>

#define ll long long

#define ull unsigned long long

#define rep(i, to) for(int i = 0; i < (to); ++i)

#define rep1(i, to) for(int i = 1; i <= (to); ++i)

#define ms(x, v) memset(x, v, sizeof(x))

using namespace std;

const int N = 100005, M = 6;

char s[N];

int main()

{

#ifdef LOCAL

    freopen("in", "r", stdin);

#endif

//    ios::sync_with_stdio(0);

    while(scanf("%s", s) > 0)

    {

        int n = strlen(s);

        if(s[0] != s[n - 1]) n++;

        puts((n & 1) ? "Second" : "First");

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.252942080540582x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cstring>

#include <cmath>

#include <algorithm>

#include <vector>

#include <queue>

#include <string>

#include <stack>

#include <map>

#include <ctime>

#include <set>

#include <bitset>

#define X first

#define Y second

#define clr(u,v); memset(u,v,sizeof(u));

#define in() freopen("data","r",stdin);

#define out() freopen("data","w",stdout);

#define Clear(Q); while (!Q.empty()) Q.pop();

#define pb push_back

using namespace std;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<char, int> pci;

const int maxn = 1e5 + 10;

const int INF = 0x3f3f3f3f;

char str[maxn];

int main()

{

#ifdef LOCAL

    in();

#endif

    scanf("%s",str);

    int len = strlen(str);

    if (str[0]==str[len-1]) len--;

    if (len&1) puts("First");

    else puts("Second");

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.250364390433677x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <algorithm>

#include <vector>

#include <stack>

#include <queue>

#include <map>

#include <set>

#include <string>

#include <cstring>

#define ll long long

#define rep(x,n) for(ll (x)=0;(x)<n;(x)++)

#define rep1(x,n) for(ll (x)=1;(x)<=n;(x)++)

using namespace std;



char s[300005],book[300005];



int main()

{

    #ifdef LOCAL

        freopen("B_data","r",stdin);

    #endif

    while(cin>>s)

    {

        ll len=strlen(s),cnt=0,l=0,r=2;

        memset(book,0,sizeof(book));

        rep(i,len)

        {

            if(!i || i==(len-1) || book[i]) continue;

            while(l && book[l]) l--;

            while(r<=i || (r<len && book[r])) r++;

            if(s[l]!=s[r])

            {

                cnt++,book[i]=1;

                //cout<<s[i];

                i-=2;

            }

        }

        //cout<<endl;

        if(cnt%2) cout<<"First"<<endl;

        else cout<<"Second"<<endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 6.918670523457962x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <cstdio>

#include <string.h>

#include <cmath>

#include <cstdlib>

#include <map>

using namespace std;



const int INF = 1 << 30;

const int maxn = 100000 + 10;

char arr[maxn];

int book[maxn];



int main()

{

    //freopen("in", "r", stdin);

    scanf("%s", arr);

    int len = strlen(arr), cnt = 0;

    for (int i = 1; i < len - 1; i++)

        if (arr[i] == arr[i - 1]);

            cnt++;

    if (arr[len - 1] == arr[0])

        len -= 3;

    else

        len -= 2;



    //printf("%d\n", cnt);

    if (len % 2 == 0)

        printf("Second\n");

    else

        printf("First\n");



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.253313610257147x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <string>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <cmath>

#include <vector>



using namespace std;

typedef long long ll;

const ll mol=1000000007;

const int maxn=1000000;

const double PI=acos(-1.0);

char ch[maxn];

int main()

{

#ifdef LOCAL

freopen("3.h","r",stdin);

#endif

    scanf("%s",ch);

    int len=strlen(ch);int num=0;

    int dp1=0,dp2=0;

    for(int i=1;i<len-1;i++)

    if(ch[i+1]!=ch[i-1])num++;

    /*for(int i=2;i<len-2;i++)

    {

        if(ch[i+1]!=ch[i-1])

        {

            if(ch[i-2]==ch[i]&&ch[i+2]==ch[i])dp1=1;

            else if(ch[i-2]==ch[i+1]&&ch[i+2]==ch[i-1])dp1=1;

            else if((ch[i-2]==ch[i]||ch[i+2]==ch[i])&&(ch[i-2]==ch[i+1]||ch[i+2]==ch[i-1]))dp2=1;

            else dp1=1;

        }

    }

    if((num%2)==0&&dp2==0)printf("Second");

    else printf("First");*/

    if(num==0)printf("Second");

    //else if(num==1)printf("First");

    else if(ch[0]==ch[len-1])

    {

        if(!(len%2))printf("First");

        else printf("Second");

    }

    else

    {

        if(len%2)printf("First");

        else printf("Second");

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.256132356995141x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}
// Slower C++ solution:
#define bi

#include <iostream>

#include<cstdio>

#include<cstdlib>

#include<cmath>

#include<cstring>

#include<algorithm>

#include<set>

#include<map>

#include<vector>

#include<queue>

#include<string>

#define MP make_pair

using namespace std;

typedef long long ll;

const ll maxn=1e5+10;

const ll mod=1e9+7;

char ch[maxn];



int main()

{

#ifdef bibi

    freopen("in.txt","r",stdin);

#endif

    ios::sync_with_stdio(false);

    cin.tie(0);

    cin>>ch;

    ll len=strlen(ch);

    if(ch[0]==ch[len-1])

    {

        if(len%2==0)

            cout<<"First";

        else

            cout<<"Second";

    }

    else

    {

        if(len%2==0)

            cout<<"Second";

        else

            cout<<"First";

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.339243267584484x):
#include <cstdio>

#include <cstring>

#include <algorithm>



using namespace std;



char st[104014];



int main(){

  while(~scanf("%s", st)){

    int len = strlen(st);

    if(st[0] != st[len-1]){

      if(len & 1) printf("First\n");

      else printf("Second\n");

    }

    else {

      if(len & 1) printf("Second\n");

      else printf("First\n");

    }

  }

  return 0;

}