Example

Input

5 Alice
10 20 30 40 50


Output

30
#include <bits/stdc++.h>
using namespace std;

using ll=int64_t;
#define int ll

#define FOR(i,a,b) for(int i=int(a);i<int(b);i++)
#define REP(i,b) FOR(i,0,b)
#define MP make_pair
#define PB push_back
#define ALL(x) x.begin(),x.end()
#define REACH cerr<<"reached line "<<__LINE__<<endl
#define DMP(x) cerr<<"line "<<__LINE__<<" "<<#x<<":"<<x<<endl
#define ZERO(x) memset(x,0,sizeof(x))

using pi=pair<int,int>;
using vi=vector<int>;
using ld=long double;

template<class T,class U>
ostream& operator<<(ostream& os,const pair<T,U>& p){
	os<<"("<<p.first<<","<<p.second<<")";
	return os;
}

template<class T>
ostream& operator <<(ostream& os,const vector<T>& v){
	os<<"[";
	REP(i,(int)v.size()){
		if(i)os<<",";
		os<<v[i];
	}
	os<<"]";
	return os;
}

int read(){
	int i;
	scanf("%" SCNd64,&i);
	return i;
}

void printSpace(){
	printf(" ");
}

void printEoln(){
	printf("\n");
}

void print(int x,int suc=1){
	printf("%" PRId64,x);
	if(suc==1)
		printEoln();
	if(suc==2)
		printSpace();
}

string readString(){
	static char buf[3341000];
	scanf("%s",buf);
	return string(buf);
}

char* readCharArray(){
	static char buf[3341000];
	static int bufUsed=0;
	char* ret=buf+bufUsed;
	scanf("%s",ret);
	bufUsed+=strlen(ret)+1;
	return ret;
}

template<class T,class U>
void chmax(T& a,U b){
	if(a<b)
		a=b;
}

template<class T,class U>
void chmin(T& a,U b){
	if(a>b)
		a=b;
}

template<class T>
T Sq(const T& t){
	return t*t;
}

const int inf=LLONG_MAX/3;

const int Nmax=100010;
int n,x[Nmax];
bool alice;

int Snuke(int l){
	int res=0,j=0;
	REP(i,n){
		while(j<n&&x[j]-x[i]<l)j++;
		chmax(res,j-i);
	}
	return res;
}

pi Rng(int l){
	int q=0,p=0;
	for(int i=0;i<n;){
		int j=i;
		while(j<n&&x[j]-x[i]<l)j++;
		int w=j-i;
		if(w>=2)q+=w-2;
		else p++;
		i=j;
	}
	return pi(q,p);
}

bool Wafrelka(int l){
	if((n%2==0)^alice){
		int s=Snuke(l);
		if(alice){
			if(s>=n/2+2)return false;
			else return true;
		}else{
			if(s>=n/2+1)return false;
			else return true;
		}
	}else{
		pi r=Rng(l);
		if(alice){
			if(r.first>=r.second)return false;
			else return true;
		}else{
			if(r.first>=r.second-1)return false;
			else return true;
		}
	}
	
}

signed main(){
	n=read();
	alice=readString()=="Alice";
	REP(i,n)x[i]=read();
	int l=1,r=1000000001;
	while(r-l>1){
		int m=(r+l)/2;
		if(Wafrelka(m))l=m;
		else r=m;
	}
	cout<<l<<endl;
}
