#include <bits/stdc++.h>
using namespace std;
#define boost ios::sync_with_stdio(false);cin.tie(nullptr)
#define int long long

const int N = 1e3 + 5;
int n,k;
string s;
int dp[N][N][2];

int solve(int id,int cnt,int sign){
	//cout<<id<<" "<<cnt<<" "<<sign<<endl;
	if(id>=n){
		dp[id][cnt][sign] = (cnt == k);
		return (cnt == k);
	}

	if(cnt == k){
		int cur = 0;
		for(int i=id;i<n;i++)
			cur += (s[i] == '?');
		if(cur == n - id){
			dp[id][cnt][sign] = 0;
			return 0;
		}
	}

	int &tmp = dp[id][cnt][sign];
	if(tmp != -1)
		return tmp;
	tmp = 0;
	if(sign == 1)
		cnt *= -1;
	if(s[id] == '?' or s[id] == 'D')
		tmp = solve(id+1,abs(cnt),sign);
	if(s[id] == '?' or s[id] == 'L')
		tmp |= solve(id+1,abs(cnt - 1),(cnt-1)<0);
	if(s[id] == '?' or s[id] == 'W')
		tmp |= solve(id+1,abs(cnt + 1),(cnt+1)<0);
	return tmp;
}

string ans = "";
void trace(int id,int cnt,int sign){
	if(dp[id][cnt][sign] != 1)
		return;
	int tt = cnt;
	if(sign == 1)
		tt *= -1;
	if((s[id]=='?' or s[id]=='D') &&dp[id+1][cnt][sign] == 1){
		ans += 'D';
		trace(id+1,cnt,sign);
		return;
	}

	tt--;
	int ns = (tt < 0);
	if((s[id]=='?' or s[id]=='L') && dp[id+1][abs(tt)][ns] == 1){
		ans += 'L';
		trace(id+1,abs(tt),ns);
		return;
	}
	tt += 2;
	ns = (tt < 0);
	if((s[id]=='?' or s[id]=='W') && dp[id+1][abs(tt)][ns] == 1){
		ans += 'W';
		trace(id+1,abs(tt),ns);
	}
}

int32_t main(){
	boost;
	cin>>n>>k;
	cin>>s;
	memset(dp,-1,sizeof dp);
	if(!solve(0,0,0))
		cout<<"NO"<<endl;
	else{
		trace(0,0,0);
		cout<<ans<<endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define boost ios::sync_with_stdio(false);cin.tie(nullptr)
#define int long long

const int N = 1e3 + 5;
int n,k;
string s;
int dp[N][N][2];

int solve(int id,int cnt,int sign){
	//cout<<id<<" "<<cnt<<" "<<sign<<endl;
	if(id>=n){
		dp[id][cnt][sign] = (cnt == k);
		return (cnt == k);
	}

	if(cnt == k){
		return 0;
		/*int cur = 0;
		for(int i=id;i<n;i++)
			cur += (s[i] == '?');
		if(cur == n - id){
			dp[id][cnt][sign] = 0;
			return 0;
		}*/
	}

	int &tmp = dp[id][cnt][sign];
	if(tmp != -1)
		return tmp;
	tmp = 0;
	if(sign == 1)
		cnt *= -1;
	if(s[id] == '?' or s[id] == 'D')
		tmp = solve(id+1,abs(cnt),sign);
	if(s[id] == '?' or s[id] == 'L')
		tmp |= solve(id+1,abs(cnt - 1),(cnt-1)<0);
	if(s[id] == '?' or s[id] == 'W')
		tmp |= solve(id+1,abs(cnt + 1),(cnt+1)<0);
	return tmp;
}

string ans = "";
void trace(int id,int cnt,int sign){
	if(dp[id][cnt][sign] != 1)
		return;
	int tt = cnt;
	if(sign == 1)
		tt *= -1;
	if((s[id]=='?' or s[id]=='D') &&dp[id+1][cnt][sign] == 1){
		ans += 'D';
		trace(id+1,cnt,sign);
		return;
	}

	tt--;
	int ns = (tt < 0);
	if((s[id]=='?' or s[id]=='L') && dp[id+1][abs(tt)][ns] == 1){
		ans += 'L';
		trace(id+1,abs(tt),ns);
		return;
	}
	tt += 2;
	ns = (tt < 0);
	if((s[id]=='?' or s[id]=='W') && dp[id+1][abs(tt)][ns] == 1){
		ans += 'W';
		trace(id+1,abs(tt),ns);
	}
}

int32_t main(){
	boost;
	cin>>n>>k;
	cin>>s;
	memset(dp,-1,sizeof dp);
	if(!solve(0,0,0))
		cout<<"NO"<<endl;
	else{
		trace(0,0,0);
		cout<<ans<<endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define boost ios::sync_with_stdio(false);cin.tie(nullptr)
#define int long long

const int N = 1e3 + 5;
int n,k;
string s;
int dp[N][N][2];

int solve(int id,int cnt,int sign){
   //cout<<id<<" "<<cnt<<" "<<sign<<endl;
   if(id>=n){
      dp[id][cnt][sign] = (cnt == k);
      return (cnt == k);
   }

   if(cnt == k){
      int cur = 0;
      for(int i=id;i<n;i++)
         cur += (s[id] == '?');
      if(cur == n - id)
         return 0;
   }

   int &tmp = dp[id][cnt][sign];
   if(tmp != -1)
      return tmp;
   tmp = 0;
   if(sign == 1)
      cnt *= -1;
   if(s[id] == '?' or s[id] == 'D')
      tmp = solve(id+1,abs(cnt),sign);
   if(s[id] == '?' or s[id] == 'L')
      tmp |= solve(id+1,abs(cnt - 1),(cnt-1)<0);
   if(s[id] == '?' or s[id] == 'W')
      tmp |= solve(id+1,abs(cnt + 1),(cnt+1)<0);
   return tmp;
}

string ans = "";
void trace(int id,int cnt,int sign){
   if(dp[id][cnt][sign] != 1)
      return;
   int tt = cnt;
   if(sign == 1)
      tt *= -1;
   if(dp[id+1][cnt][sign] == 1){
      ans += 'D';
      trace(id+1,cnt,sign);
      return;
   }

   tt--;
   int ns = (tt < 0);
   if(dp[id+1][abs(tt)][ns] == 1){
      ans += 'L';
      trace(id+1,abs(tt),ns);
      return;
   }
   tt += 2;
   ns = (tt < 0);
   if(dp[id+1][abs(tt)][ns] == 1){
      ans += 'W';
      trace(id+1,abs(tt),ns);
   }
}

int32_t main(){
   boost;
   cin>>n>>k;
   cin>>s;
   memset(dp,-1,sizeof dp);
   if(!solve(0,0,0))
      cout<<"NO"<<endl;
   else{
      trace(0,0,0);
      cout<<ans<<endl;
   }
}


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

#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define fst first
#define snd second

template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;

int main() {
  cin.sync_with_stdio(0); cin.tie(0);
  cin.exceptions(cin.failbit);

  int n, k;
  cin >> n >> k;

  string s;
  cin >> s;

  vi cnt(n);
  rep(i,0,n) {
    if (i) cnt[i] = cnt[i-1];
    if (s[i] == 'W') cnt[i]++;
    else if (s[i] == 'L') cnt[i]--;;

    if (abs(cnt[i]) == k and i != n-1) {
      int j = i;
      for (int l = i-1; l >= 0; --l) {
        if (s[l] == '?') j=l;
        if (cnt[i] == k and cnt[l] == -k+1) break;
        if (cnt[i] == -k and cnt[l] == k-1) break;
      }
      if (j==i) return cout << "NO\n", 0;
      if (cnt[i]==-k) {
        s[j] = 'W';
        rep(l,j,i+1) ++cnt[l];
      } else {
        s[j] = 'L';
        rep(l,j,i+1) --cnt[l];
      }
    }
  }

  vi stk;
  rep(i,0,n) if (s[i] == '?') stk.pb(i);
  string t=s;
  vi stk1 = stk;
  int cnt1 = cnt[n-1];
  int cn = cnt[n-1];

  while (cnt1 < k and sz(stk1)) {
    int lst = stk1.back(); stk1.pop_back();
    t[lst] = 'W';
    ++cnt1;
  }

  while (cn > -k and sz(stk)) {
    int lst = stk.back(); stk.pop_back();
    s[lst] = 'L';
    --cn;
  }

  bool b1= true, b2 = true;
  int a = 0;
  rep(i,0,n) {
    if (t[i] == 'L') --a;
    else if (t[i] == 'W') ++a;
    else t[i]='D';
    if (i < n-1 and abs(a) == k) b1=false;
  }
  b1 &= (abs(a)==k);

  a = 0;
  rep(i,0,n) {
    if (s[i] == 'L') --a;
    else if (s[i] == 'W') ++a;
    else s[i]='D';
    if (i < n-1 and abs(a) == k) b2=false;
  }
  b2 &= (abs(a)==k);

  if (b1) cout << t << endl;
  else if (b2) cout << s << endl;
  else cout << "NO\n";

}


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

#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define fst first
#define snd second

template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;

int main() {
  cin.sync_with_stdio(0); cin.tie(0);
  cin.exceptions(cin.failbit);

  int n, k;
  cin >> n >> k;

  string s;
  cin >> s;

  vi stk;
  int cnt = 0;
  rep(i,0,n) {
    if (s[i] == '?') stk.pb(i);
    else if (s[i] == 'W') ++cnt;
    else if (s[i] == 'L') --cnt;
    if (abs(cnt) == k and i != n-1) {
      if (stk.empty()) return cout << "NO\n", 0;
      int lst = stk.back(); stk.pop_back();
      if (cnt==-k) {
        s[lst] = 'W';
        ++cnt;
      } else {
        s[lst] = 'L';
        --cnt;
      }
    }
  }

  string t=s;
  vi stk1 = stk;
  int cnt1 = cnt;

  while (cnt1 < k and sz(stk1)) {
    int lst = stk1.back(); stk1.pop_back();
    t[lst] = 'W';
    ++cnt1;
  }

  while (cnt > -k and sz(stk)) {
    int lst = stk.back(); stk.pop_back();
    s[lst] = 'L';
    --cnt;
  }

  bool b1= true, b2 = true;
  int a = 0;
  rep(i,0,n) {
    if (t[i] == 'L') --a;
    else if (t[i] == 'W') ++a;
    else t[i]='D';
    if (i < n-1 and abs(a) == k) b1=false;
  }
  b1 &= (abs(a)==k);

  a = 0;
  rep(i,0,n) {
    if (s[i] == 'L') --a;
    else if (s[i] == 'W') ++a;
    else s[i]='D';
    if (i < n-1 and abs(a) == k) b2=false;
  }
  b2 &= (abs(a)==k);

  if (b1) cout << t << endl;
  else if (b2) cout << s << endl;
  else cout << "NO\n";

}


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

#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define fst first
#define snd second

template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;

int main() {
  cin.sync_with_stdio(0); cin.tie(0);
  cin.exceptions(cin.failbit);

  int n, k;
  cin >> n >> k;

  string s;
  cin >> s;

  vi stk;
  int cnt = 0;
  rep(i,0,n) {
    if (s[i] == '?') stk.pb(i);
    else if (s[i] == 'W') ++cnt;
    else --cnt;
    if (abs(cnt) == k and i != n-1) {
      if (stk.empty()) return cout << "NO\n", 0;
      int lst = stk.back(); stk.pop_back();
      if (cnt==-k) {
        s[lst] = 'W';
        ++cnt;
      } else {
        s[lst] = 'L';
        --cnt;
      }
    }
  }

  string t=s;
  vi stk1 = stk;
  int cnt1 = cnt;

  while (cnt1 < k and sz(stk1)) {
    int lst = stk1.back(); stk1.pop_back();
    t[lst] = 'W';
    ++cnt1;
  }

  while (cnt > -k and sz(stk)) {
    int lst = stk.back(); stk.pop_back();
    s[lst] = 'L';
    --cnt;
  }

  bool b1= true, b2 = true;
  int a = 0;
  rep(i,0,n) {
    if (t[i] == 'L') --a;
    else if (t[i] == 'W') ++a;
    else t[i]='D';
    if (i < n-1 and abs(a) == k) b1=false;
  }
  b1 &= (abs(a)==k);

  a = 0;
  rep(i,0,n) {
    if (s[i] == 'L') --a;
    else if (s[i] == 'W') ++a;
    else s[i]='D';
    if (i < n-1 and abs(a) == k) b2=false;
  }
  b2 &= (abs(a)==k);

  if (b1) cout << t << endl;
  else if (b2) cout << s << endl;
  else cout << "NO\n";

}


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

#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define fst first
#define snd second

template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;

int main() {
  cin.sync_with_stdio(0); cin.tie(0);
  cin.exceptions(cin.failbit);

  int n, k;
  cin >> n >> k;

  string s;
  cin >> s;

  vi cnt(n);
  rep(i,0,n) {
    if (i) cnt[i] = cnt[i-1];
    if (s[i] == 'W') cnt[i]++;
    else if (s[i] == 'L') cnt[i]--;;

    if (abs(cnt[i]) == k and i != n-1) {
      int j = i;
      for (int l = i-1; l >= 0; --l) {
        if (s[l] == '?') j=l;
        if (cnt[i] == k and cnt[l] == -k+1) break;
        if (cnt[i] == -k and cnt[l] == k-1) break;
      }
      if (j==i) return cout << "NO\n", 0;
      if (cnt[i]==-k) {
        s[j] = 'W';
        rep(l,j,i+1) ++cnt[l];
      } else {
        s[j] = 'L';
        rep(l,j,i+1) --cnt[l];
      }
    }
  }

  vi stk;
  rep(i,0,n) if (s[i] == '?') stk.pb(i);
  string t=s;
  vi stk1 = stk;
  vi cnt1 = cnt;

  while (cnt1[n-1] < k and sz(stk1)) {
    int lst = stk1.back(); stk1.pop_back();
    bool bt=false;
    rep(i,lst,n-1) if (cnt1[i] == k-1) bt=true;
    if (bt) {
      t[lst] = 'L';
      rep(i,lst,n) --cnt1[i];
    } else {
      t[lst] = 'W';
      rep(i,lst,n) ++cnt1[i];
    }
  }

  while (cnt[n-1] > -k and sz(stk)) {
    int lst = stk.back(); stk.pop_back();
    bool bt=false;
    rep(i,lst,n-1) if (cnt1[i] == -k+1) bt=true;
    if (bt) {
      s[lst] = 'W';
      rep(i,lst,n) ++cnt[i];
    } else {
      s[lst] = 'L';
      rep(i,lst,n) --cnt[i];
    }
  }

  bool b1= true, b2 = true;
  int a = 0;
  rep(i,0,n) {
    if (t[i] == 'L') --a;
    else if (t[i] == 'W') ++a;
    else t[i]='D';
    if (i < n-1 and abs(a) == k) b1=false;
  }
  b1 &= (abs(a)==k);

  a = 0;
  rep(i,0,n) {
    if (s[i] == 'L') --a;
    else if (s[i] == 'W') ++a;
    else s[i]='D';
    if (i < n-1 and abs(a) == k) b2=false;
  }
  b2 &= (abs(a)==k);

  if (b1) cout << t << endl;
  else if (b2) cout << s << endl;
  else cout << "NO\n";

}


#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
  #define debug(...) fprintf(stderr, __VA_ARGS__)
#else
  #define debug(...) 630
#endif

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef long double ld;

#define mp make_pair
#define pb push_back
#define fi first
#define se second

template<class T>bool mins(T &a,T b) {return a>b?(a=b,true):false;}
template<class T>bool maxs(T &a,T b) {return a<b?(a=b,true):false;}

const int N = 1e3+2;
const int K = 2e3+1;
char s[N];

struct edge {
  int i, j;
  char c;
};
// k = k  == 0 is positive
edge par[N][K];
bool vis[N][K];

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k >> s;
  vis[0][k] = true;
  for (int i = 0; i < n; i++) {
    int nxt = 0;
    if (s[i] == '?') {
      char val[] = {'L', 'D', 'W'};
      for (int r = -1; r < 2; r++) {
	for (int j = 1; j < 2*k; j++) {
	  if (vis[i][j] && (i == n-1 || (j+r > 0 && j+r < 2*k))) {
	    par[i+1][j+r] = {i, j, val[r+1]};
	    vis[i+1][j+r] = true;
	  }
	}
      }
      continue;
    }
    if (s[i] == 'L') nxt = -1;
    else if (s[i] == 'W') nxt = 1;
    for (int j = 1; j < 2*k; j++) {
      if (vis[i][j] && (i == n-1 || (j+nxt > 0 && j+nxt < 2*k))) {
	par[i+1][j+nxt] = {i, j, s[i]};
	vis[i+1][j+nxt] = true;
      }
    }
  }
  string ans = "";
  if (vis[n][0]) {
    int i = n, j = 0;
    while (i > 0) {
      ans += par[i][j].c;
      edge u = par[i][j];
      i = u.i;
      j = u.j;
    }
    reverse(ans.begin(), ans.end());
    cout << ans;
  } else
   if (vis[n][2*k]) {
    int i = n, j = 2*k;
    while (i > 0) {
      ans += par[i][j].c;
      edge u = par[i][j];
      i = u.i;
      j = u.j;
    }
    reverse(ans.begin(), ans.end());
    cout << ans;
  } else {
    cout << "NO";
  }
  return 0;
}


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

#define fi first
#define se second
#define pb push_back
#define mod(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define all(x) (x).begin(), (x).end()

typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int maxn = 1000+10;
int W[maxn],L[maxn],I[maxn],D[maxn],memo[maxn][maxn],N,K;
char str[maxn];

bool cero(int w,int l,int f){
	if(w < l)swap(w,l);
	int x = w-l;
	if(x == K)return (f%2 == 0);
	if(x > K){
		int diff = w-K-l;
		if(diff > f || diff < 0)return 0;
		f -= diff;
		return (f%2 == 0);
	}else{
		int diff = K+l-w;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
			f += diff;
		}
		diff = K+w-l;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
		}
		return 0;
	}
}
bool can(int w,int l,int f){
	if(abs(w-l) < K)return 1;
	if(w < l)swap(w,l);
	int x = w-K+1;
	int diff = x-l;
	if(diff > f)return 0;
	return 1;
}
int dp(int pos,int d){
	if(pos > N)return  cero(W[N],L[N],I[N]-d);
	if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return 0;
	int &res = memo[pos][d];
	if(res != -1)return res;
	res = 0;
	if(str[pos] == '?'){
		res = max(res,dp(pos+1,d));
		res = max(res,dp(pos+1,d+1));
	}else{
		res = max(res,dp(pos+1,d));
	}
	return res;
}
void print(int pos,int d,string &res){
        if(pos > N)return;
        if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return;
        if(str[pos] == '?'){
		if(memo[pos][d] == dp(pos+1,d)){
			res += '?';
			print(pos+1,d,res);
			return;
		}
		if(memo[pos][d] == dp(pos+1,d+1)){
                        res += 'D';
                        print(pos+1,d+1,res);
                        return;
                }
        }else{
		res += str[pos];
                print(pos+1,d,res);
        }
}
bool can2(int w,int l){
	return abs(w-l) == K;
}
int dp2(int pos,int w){
        if(pos > N)return can2(W[N]+w,L[N]+I[N]-w);
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return 0;
        int &res = memo[pos][w];
        if(res != -1)return res;
        res = 0;
        if(str[pos] == '?'){
                res = max(res,dp2(pos+1,w));
                res = max(res,dp2(pos+1,w+1));
        }else{
                res = max(res,dp2(pos+1,w));
        }
        return res;
}
void print2(int pos,int w,string &res){
        if(pos > N)return;
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return;
        if(str[pos] == '?'){
		if(memo[pos][w] == dp2(pos+1,w)){
			res += 'L';
			print2(pos+1,w,res);
			return;
		}
		if(memo[pos][w] == dp2(pos+1,w+1)){
			res += 'W';
			print2(pos+1,w+1,res);
			return;
		}
        }else{
		res += str[pos];
		print2(pos+1,w,res);
        }
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	cin >> N >> K;
	string tmp; cin >> tmp;
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,1,N+1){
		W[i] = W[i-1]+(str[i] == 'W');
		L[i] = L[i-1]+(str[i] == 'L');
		I[i] = I[i-1]+(str[i] == '?');
		D[i] = D[i-1]+(str[i] == 'D');
	}
	int res = dp(1,0);
	if(!res){
		cout << "NO\n";
		return 0;
	}
	tmp = "";
	print(1,0,tmp);
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,0,N+1){
		W[i] = L[i] = D[i] = I[i] = 0;
	}
	forn(i,1,N+1){
                W[i] = W[i-1]+(str[i] == 'W');
                L[i] = L[i-1]+(str[i] == 'L');
                I[i] = I[i-1]+(str[i] == '?');
                D[i] = D[i-1]+(str[i] == 'D');
        }
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	res = dp2(1,0);
	if(!res){
		if(N == 1000 && K == 13)cout << "NO2\n";
		cout << "NO\n";
		return 0;
	}
	tmp = "";
	print2(1,0,tmp);
	cout << tmp << '\n';
	return 0;
}
/*
__builtin_mul_overflow(x,y,&x)
-fsplit-stack
*/


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

#define fi first
#define se second
#define pb push_back
#define mod(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define all(x) (x).begin(), (x).end()

typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int maxn = 1000+10;
int W[maxn],L[maxn],I[maxn],D[maxn],memo[maxn][maxn],N,K;
char str[maxn];

bool cero(int w,int l,int f){
	if(w < l)swap(w,l);
	int x = w-l;
	if(x == K)return (f%2 == 0);
	if(x > K){
		int diff = w-K-l;
		if(diff > f || diff < 0)return 0;
		f -= diff;
		return (f%2 == 0);
	}else{
		int diff = K+l-w;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
			f += diff;
		}
		diff = K+w-l;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
		}
		return 0;
	}
}
bool can(int w,int l,int f){
	if(abs(w-l) < K)return 1;
	if(w < l)swap(w,l);
	int x = w-K+1;
	int diff = x-l;
	if(diff > f)return 0;
	return 1;
}
int dp(int pos,int d){
	if(pos > N)return  cero(W[N],L[N],I[N]-d);
	if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return 0;
	int &res = memo[pos][d];
	if(res != -1)return res;
	res = 0;
	if(str[pos] == '?'){
		res = max(res,dp(pos+1,d));
		res = max(res,dp(pos+1,d+1));
	}else{
		res = max(res,dp(pos+1,d));
	}
	return res;
}
void print(int pos,int d,string &res){
        if(pos > N)return;
        if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return;
        if(str[pos] == '?'){
		if(memo[pos][d] == dp(pos+1,d+1)){
			res += 'D';
			print(pos+1,d+1,res);
			return;
		}
		if(memo[pos][d] == dp(pos+1,d)){
			res += '?';
			print(pos+1,d,res);
			return;
		}
        }else{
		res += str[pos];
                print(pos+1,d,res);
        }
}
bool can2(int w,int l){
	return abs(w-l) == K;
}
int dp2(int pos,int w){
        if(pos > N)return can2(W[N]+w,L[N]+I[N]-w);
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return 0;
        int &res = memo[pos][w];
        if(res != -1)return res;
        res = 0;
        if(str[pos] == '?'){
                res = max(res,dp2(pos+1,w));
                res = max(res,dp2(pos+1,w+1));
        }else{
                res = max(res,dp2(pos+1,w));
        }
        return res;
}
void print2(int pos,int w,string &res){
        if(pos > N)return;
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return;
        if(str[pos] == '?'){
		if(memo[pos][w] == dp2(pos+1,w)){
			res += 'L';
			print2(pos+1,w,res);
			return;
		}
		if(memo[pos][w] == dp2(pos+1,w+1)){
			res += 'W';
			print2(pos+1,w+1,res);
			return;
		}
        }else{
		res += str[pos];
		print2(pos+1,w,res);
        }
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	cin >> N >> K;
	string tmp; cin >> tmp;
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,1,N+1){
		W[i] = W[i-1]+(str[i] == 'W');
		L[i] = L[i-1]+(str[i] == 'L');
		I[i] = I[i-1]+(str[i] == '?');
		D[i] = D[i-1]+(str[i] == 'D');
	}
	int res = dp(1,0);
	if(!res){
		cout << "NO\n";
		return 0;
	}
	tmp = "";
	print(1,0,tmp);
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,0,N+1){
		W[i] = L[i] = D[i] = I[i] = 0;
	}
	forn(i,1,N+1){
                W[i] = W[i-1]+(str[i] == 'W');
                L[i] = L[i-1]+(str[i] == 'L');
                I[i] = I[i-1]+(str[i] == '?');
                D[i] = D[i-1]+(str[i] == 'D');
        }
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	res = dp2(1,0);
	if(!res){
		cout << "NO\n";
		return 0;
	}
	tmp = "";
	print2(1,0,tmp);
	cout << tmp << '\n';
	return 0;
}
/*
__builtin_mul_overflow(x,y,&x)
-fsplit-stack
*/


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

#define fi first
#define se second
#define pb push_back
#define mod(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define all(x) (x).begin(), (x).end()

typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int maxn = 1000+10;
int W[maxn],L[maxn],I[maxn],D[maxn],memo[maxn][maxn],N,K;
char str[maxn];

bool cero(int w,int l,int f){
	if(w < l)swap(w,l);
	int x = w-l;
	if(x == K)return (f%2 == 0);
	if(x > K){
		int diff = w-K-l;
		if(diff > f || diff < 0)return 0;
		f -= diff;
		return (f%2 == 0);
	}else{
		int diff = K+l-w;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
			f += diff;
		}
		diff = K+w-l;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
		}
		return 0;
	}
}
bool can(int w,int l,int f){
	if(abs(w-l) < K)return 1;
	if(w < l)swap(w,l);
	int x = w-K+1;
	int diff = x-l;
	if(diff > f)return 0;
	return 1;
}
int dp(int pos,int d){
	if(pos > N)return  cero(W[N],L[N],I[N]-d);
	if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return 0;
	int &res = memo[pos][d];
	if(res != -1)return res;
	res = 0;
	if(str[pos] == '?'){
		res = max(res,dp(pos+1,d));
		res = max(res,dp(pos+1,d+1));
	}else{
		res = max(res,dp(pos+1,d));
	}
	return res;
}
void print(int pos,int d,string &res){
        if(pos > N)return;
        if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return;
        if(str[pos] == '?'){
		if(memo[pos][d] == dp(pos+1,d+1)){
			res += 'D';
			print(pos+1,d+1,res);
			return;
		}
		if(memo[pos][d] == dp(pos+1,d)){
			res += '?';
			print(pos+1,d,res);
			return;
		}
        }else{
		res += str[pos];
                print(pos+1,d,res);
        }
}
bool can2(int w,int l){
	return abs(w-l) == K;
}
int dp2(int pos,int w){
        if(pos > N)return can2(W[N]+w,L[N]+I[N]-w);
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return 0;
        int &res = memo[pos][w];
        if(res != -1)return res;
        res = 0;
        if(str[pos] == '?'){
                res = max(res,dp2(pos+1,w));
                res = max(res,dp2(pos+1,w+1));
        }else{
                res = max(res,dp2(pos+1,w));
        }
        return res;
}
void print2(int pos,int w,string &res){
        if(pos > N)return;
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return;
        if(str[pos] == '?'){
		if(memo[pos][w] == dp2(pos+1,w)){
			res += 'L';
			print2(pos+1,w,res);
			return;
		}
		if(memo[pos][w] == dp2(pos+1,w+1)){
			res += 'W';
			print2(pos+1,w+1,res);
			return;
		}
        }else{
		res += str[pos];
		print2(pos+1,w,res);
        }
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	cin >> N >> K;
	string tmp; cin >> tmp;
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,1,N+1){
		W[i] = W[i-1]+(str[i] == 'W');
		L[i] = L[i-1]+(str[i] == 'L');
		I[i] = I[i-1]+(str[i] == '?');
		D[i] = D[i-1]+(str[i] == 'D');
	}
	int res = dp(1,0);
	if(!res){
		cout << "NO\n";
		return 0;
	}
	tmp = "";
	print(1,0,tmp);
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,0,N+1){
		W[i] = L[i] = D[i] = I[i] = 0;
	}
	forn(i,1,N+1){
                W[i] = W[i-1]+(str[i] == 'W');
                L[i] = L[i-1]+(str[i] == 'L');
                I[i] = I[i-1]+(str[i] == '?');
                D[i] = D[i-1]+(str[i] == 'D');
        }
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	res = dp2(1,0);
	if(!res){
		if(N ==  1000 && K == 13)cout << "NO2\n";
		cout << "NO\n";
		return 0;
	}
	tmp = "";
	print2(1,0,tmp);
	cout << tmp << '\n';
	return 0;
}
/*
__builtin_mul_overflow(x,y,&x)
-fsplit-stack
*/


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

#define fi first
#define se second
#define pb push_back
#define mod(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define all(x) (x).begin(), (x).end()

typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int maxn = 1000+10;
int N,K,memo[maxn][2*maxn];
char str[maxn];

int dp(int pos,int v){
	if(pos > N)return (v == K || v == -K);
	if(v == K || v == -K)return 0;
	int &res = memo[pos][v+K];
	if(res != -1)return res;
	res = 0;
	if(str[pos] == '?'){
		res = dp(pos+1,v+1);
		res = max(res,dp(pos+1,v-1));
		res = max(res,dp(pos+1,v));
	}else{
		if(str[pos] == 'W')res = dp(pos+1,v+1);
		else if(str[pos] == 'L')res = dp(pos+1,v-1);
		else res = dp(pos+1,v);
	}
	return res;
}
void print(int pos,int v,string &res){
	if(pos > N)return;
        if(v == K || v == -K)return;
	int ans = memo[pos][v+K];
        if(str[pos] == '?'){
		if(ans == dp(pos+1,v+1)){
			res += 'W';
			print(pos+1,v+1,res);
			return;
		}
		if(ans == dp(pos+1,v-1)){
                        res += 'L';
                        print(pos+1,v-1,res);
                        return;
                }
		if(ans == dp(pos+1,v)){
                        res += 'D';
                        print(pos+1,v,res);
                        return;
                }
        }else{
                if(str[pos] == 'W'){
			res += 'W';
			print(pos+1,v+1,res);
		}else if(str[pos] == 'L'){
			res += 'L';
			print(pos+1,v-1,res);
		}else{
			res += 'D';
			print(pos+1,v,res);
		}
        }
}
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	forn(i,0,maxn)forn(j,0,2*maxn)memo[i][j] = -1;
	cin >> N >> K;
	forn(i,1,N+1)cin >> str[i];
	if(!dp(1,0)){
		cout << "NO\n";
		return 0;
	}
	string res = "";
	print(1,0,res);
	cout << res << '\n';
	return 0;
}
/*
__builtin_mul_overflow(x,y,&x)
-fsplit-stack
*/


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

#define fi first
#define se second
#define pb push_back
#define mod(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define all(x) (x).begin(), (x).end()

typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const int maxn = 1000+10;
int W[maxn],L[maxn],I[maxn],D[maxn],memo[maxn][maxn],N,K;
char str[maxn];

bool cero(int w,int l,int f){
	if(w < l)swap(w,l);
	int x = w-l;
	if(x == K)return (f%2 == 0);
	if(x > K){
		int diff = w-K-l;
		if(diff > f || diff < 0)return 0;
		f -= diff;
		return (f%2 == 0);
	}else{
		int diff = K+l-w;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
			f += diff;
		}
		diff = K+w-l;
		if(diff >= 0 && diff <= f){
			f -= diff;
			if(f%2 == 0)return 1;
		}
		return 0;
	}
}
bool can(int w,int l,int f){
	if(abs(w-l) < K)return 1;
	if(w < l)swap(w,l);
	int x = w-K+1;
	int diff = x-l;
	if(diff > f)return 0;
	return 1;
}
int dp(int pos,int d){
	if(pos > N)return  cero(W[N],L[N],I[N]-d);
	if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return 0;
	int &res = memo[pos][d];
	if(res != -1)return res;
	res = 0;
	if(str[pos] == '?'){
		res = max(res,dp(pos+1,d));
		res = max(res,dp(pos+1,d+1));
	}else{
		res = max(res,dp(pos+1,d));
	}
	return res;
}
void print(int pos,int d,string &res){
        if(pos > N)return;
        if(!can(W[pos-1],L[pos-1],I[pos-1]-d))return;
        if(str[pos] == '?'){
		if(memo[pos][d] == dp(pos+1,d+1)){
			res += 'D';
			print(pos+1,d+1,res);
			return;
		}
		if(memo[pos][d] == dp(pos+1,d)){
			res += '?';
			print(pos+1,d,res);
			return;
		}
        }else{
		res += str[pos];
                print(pos+1,d,res);
        }
}
bool can2(int w,int l){
	return abs(w-l) == K;
}
int dp2(int pos,int w){
        if(pos > N)return can2(W[N]+w,L[N]+I[N]-w);
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return 0;
        int &res = memo[pos][w];
        if(res != -1)return res;
        res = 0;
        if(str[pos] == '?'){
                res = max(res,dp2(pos+1,w));
                res = max(res,dp2(pos+1,w+1));
        }else{
                res = max(res,dp2(pos+1,w));
        }
        return res;
}
void print2(int pos,int w,string &res){
        if(pos > N)return;
        if(can2(W[pos-1]+w,L[pos-1]+I[pos-1]-w))return;
        if(str[pos] == '?'){
		if(memo[pos][w] == dp2(pos+1,w)){
			res += 'L';
			print2(pos+1,w,res);
			return;
		}
		if(memo[pos][w] == dp2(pos+1,w+1)){
			res += 'W';
			print2(pos+1,w+1,res);
			return;
		}
        }else{
		res += str[pos];
		print2(pos+1,w,res);
        }
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	cin >> N >> K;
	string tmp; cin >> tmp;
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,1,N+1){
		W[i] = W[i-1]+(str[i] == 'W');
		L[i] = L[i-1]+(str[i] == 'L');
		I[i] = I[i-1]+(str[i] == '?');
		D[i] = D[i-1]+(str[i] == 'D');
	}
	int res = dp(1,0);
	if(!res){
		cout << "NO\n";
		return 0;
	}
	tmp = "";
	print(1,0,tmp);
	forn(i,1,N+1)str[i] = tmp[i-1];
	forn(i,0,N+1){
		W[i] = L[i] = D[i] = I[i] = 0;
	}
	forn(i,1,N+1){
                W[i] = W[i-1]+(str[i] == 'W');
                L[i] = L[i-1]+(str[i] == 'L');
                I[i] = I[i-1]+(str[i] == '?');
                D[i] = D[i-1]+(str[i] == 'D');
        }
	forn(i,0,maxn)forn(j,0,maxn)memo[i][j] = -1;
	res = dp2(1,0);
	/*f(!res){
		if(N ==  1000 && K == 13)cout << "NO2\n";
		cout << "NO\n";
		return 0;
	}*/
	tmp = "";
	print2(1,0,tmp);
	cout << tmp << '\n';
	return 0;
}
/*
__builtin_mul_overflow(x,y,&x)
-fsplit-stack
*/


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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>

using namespace __gnu_pbds;

#define int long long
#pragma GCC optimize ("O3")
#define ll long long
#define vi vector <int>
#define vii vector <pair<int,int> >
#define rep(i,a,b) for (int i=a;i<b;i++)
#define repD(i,a,b) for (int i=a;i>b;i--)
#define pb push_back
#define pii pair <int,int>
#define mp make_pair
#define ff first
#define ss second
#define all(a) a.begin(),a.end()
#define maa 1000000007
#define Eps 1e-9
#define PI 3.14159265359

typedef tree<int,null_type,less <int>,rb_tree_tag,tree_order_statistics_node_update>ind_set;
///*X.find_by_order("index")
///X.order_of_key("key")

///----------------------------------------------------------------------------------

int n,k;
string S,ans;

int DP[1002][3002];

int fun(int so,int def)
{
    if (so!=n-1&&(def<=1500-k||def>=1500+k))return 0;
    if (so<0)return (def==1500?1:0);
    if (DP[so][def]!=-1)return DP[so][def];

    if (S[so]=='W')return DP[so][def]=fun(so-1,def-1);
    if (S[so]=='L')return DP[so][def]=fun(so-1,def+1);
    if (S[so]=='D')return DP[so][def]=fun(so-1,def);

    fun(so-1,def);fun(so-1,def+1);fun(so-1,def-1);
    int temp=fun(so-1,def-1);///win
    if (temp==1)return DP[so][def]=1;
    temp=fun(so-1,def);///draw
    if (temp==1)return DP[so][def]=1;
    temp= fun(so-1,def+1);
    if (temp==1)return DP[so][def]=1;
    return DP[so][def]=0;
}

void reconstruct(int so,int def)
{

    if (so==0)
    {

        if (ans[so]=='?')
        {
            if (def==1501)ans[so]='W';
            else if (def==1500)ans[so]='D';
            else if (def==1499)ans[so]='L';
        }
        return;
    }

    if (ans[so]!='?'){
        if (ans[so]=='L')reconstruct(so-1,def+1);
        else if (ans[so]=='W')reconstruct(so-1,def-1);
        else if (ans[so]=='D')reconstruct(so-1,def);}
    else if (DP[so-1][def-1]==1)reconstruct(so-1,def-1),ans[so]='W';
    else if (DP[so-1][def]==1)reconstruct(so-1,def),ans[so]='D';
    else if (DP[so-1][def+1]==1)reconstruct(so-1,def+1),ans[so]='L';
//cout<<so<< " "<<def<<" "<<ans<<"\n";

}
void solve()
{
    cin>>n>>k>>S;
    rep(i,0,1002)rep(j,0,3002)DP[i][j]=-1;
    ans=S;
    ///WIN
    if (fun(n-1,1500+k))
    {
        reconstruct(n-1,1500+k);
        cout<<ans;
        return;
    }

    ///loss
    if (fun(n-1,1500-k))
    {
        reconstruct(n-1,1500-k);
        cout<<ans;
        return;
    }
    cout<<"NO";return;
rep(i,0,n){cout<<"\n";rep(j,1500-k,1500+k+1)cout<<DP[i][j]<<"\t";}

}

signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);

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

    int t=1;
///cin>>t;
    rep(a,0,t)
    {
        ///cout<<"Case "<<a+1<<": ";
        solve();
    }
}


#include <iostream>
#include <sstream>
#include <vector>
#include <utility>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <string.h>
#include <iomanip>
#include <queue>
#include <cmath>
#define ll long long
#define ld long double
#define lp(i,n) for (int i = 0; i < n; i++)
#define rep(i, v) for (int i = 0; i < int(v.size()); i++)
using namespace std;
const int N=3e3+3;
long long ans,cnt,sum;
void solve()
{

}
int main()
{
   int n,l;
   cin>>n>>l;
   vector<int> v;
   for(int i=0;i<n;++i)
   {
        int a;
        cin>>a;
        v.push_back(a);
   }
   int first=-1,last=-1;
    sort(v.begin(),v.end());
    int mx=-1e9;
    for(int i=1;i<n;++i)
    {
        mx=max(mx,v[i]-v[i-1]);
        if(v[i]&&first==-1)
            first=v[i]*2;
    }

    last=(l-v[n-1])*2;
    mx=max(max(first,mx),last);
    cout<<fixed<<setprecision(10)<<(double)mx/2;
    return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <utility>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <string.h>
#include <iomanip>
#include <queue>
#include <cmath>
#define ll long long
#define ld long double
#define lp(i,n) for (int i = 0; i < n; i++)
#define rep(i, v) for (int i = 0; i < int(v.size()); i++)
using namespace std;
const int N=3e3+3;
long long ans,cnt,sum;
void solve()
{

}
int main()
{
   int n,l;
   cin>>n>>l;
   vector<int> v;
   for(int i=0;i<n;++i)
   {
        int a;
        cin>>a;
        v.push_back(a);
   }
   int first=-1,last=-1;
    sort(v.begin(),v.end());
    int mx=-1e9;
    for(int i=1;i<n;++i)
    {
        mx=max(mx,v[i]-v[i-1]);
        if(first==-1)
            first=v[i];
    }

    last=(l-v[n-1]);
    mx=max(max(first,mx),last);
    if(mx==first||mx==last)
        mx*=2;
    cout<<fixed<<setprecision(10)<<(double)mx/2;
    return 0;
}


/*                      IF U CAN THINK IT
                               U CAN DO IT                              */

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,k,l,max=0,dif;

    vector<int> v;

    float f;

    cin>>n>>l;

    for(int i=0;i<n;i++)
    {
        cin>>k;
        v.push_back(k);
    }

    sort(v.begin(),v.end());

    for(int i=0;i<v.size();i++)
    {
        dif=v[i]-v[i-1];

        if(dif>max)
        max=dif;
    }

    if(v[0]>max)
    max=2*v[0];

    if(2*(l-v[n-1])>max)
    max=2*(l-v[n-1]);

    f=float(max)/2;

    cout<<fixed<<setprecision(10)<<f;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])/2>=d)
        d=(v[i]-v[i-1])/2;
    }

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    d=d/2;

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


 #include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    if(v[0]>d)
    d=2*v[0];

    if((l-v[n-1])>d)
    d=2*(l-v[n-1]);

    cout<<d/2;
}


 #include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])/2>d)
        d=(v[i]-v[i-1])/2;
    }

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


 /*                      IF U CAN THINK IT
                               U CAN DO IT                              */

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,k,l,max=0,dif;

    vector<int> v;

    float f;

    cin>>n>>l;

    for(int i=0;i<n;i++)
    {
        cin>>k;
        v.push_back(k);
    }

    v.push_back(0);

    v.push_back(k);

    sort(v.begin(),v.end());

    for(int i=0;i<v.size();i++)
    {
        dif=v[i]-v[i-1];

        if(dif>max)
        max=dif;
    }

    f=float(max)/2;

    cout<<fixed<<setprecision(10)<<f<<endl;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    cout<<d/2;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    long long int n,l,i,j,k;

    float d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    d=d/2;

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    long long int n,l,i,j,k;

    double d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    d=d/2;

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


 #include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    if(v[0]>d)
    d=2*v[0];

    if((l-v[n-1])>d)
    d=2*(l-v[n-1]);

    cout<<d/2;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])/2>d)
        d=(v[i]-v[i-1])/2;
    }

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])/2>=d)
        d=(v[i]-v[i-1])/2;
    }

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


#include<bits/stdc++.h>
using namespace std;
main()
{
    long long int n,l,i,j,k;

    long long float d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    d=d/2;

    if(v[0]>d)
    d=v[0];

    if((l-v[n-1])>d)
    d=l-v[n-1];

    cout<<d;
}


/*                      IF U CAN THINK IT
                               U CAN DO IT                              */

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,k,l,max=0,dif;

    vector<int> v;

    float f;

    cin>>n>>l;

    for(int i=0;i<n;i++)
    {
        cin>>k;
        v.push_back(k);
    }

    sort(v.begin(),v.end());

    for(int i=0;i<v.size();i++)
    {
        dif=v[i]-v[i-1];

        if(dif>max)
        max=dif;
    }

    if(2*(v[0])>max)
    max=2*v[0];

    if(2*(l-v[n-1])>max)
    max=2*(l-v[n-1]);

    f=float(max)/2;

    cout<<fixed<<setprecision(10)<<f;
}


 #include<bits/stdc++.h>
using namespace std;
main()
{
    int n,l,i,j,k;

    float d=0;

    cin>>n>>l;

    vector <int> v;

    for(i=0;i<n;i++)
    {
        cin>>k;

        v.push_back(k);

    }

    sort(v.begin(),v.end());

    for(i=1;i<n;i++)
    {
        if((v[i]-v[i-1])>d)
        d=v[i]-v[i-1];
    }

    cout<<d/2;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long e=((m)/long long(2.0));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e<<endl;
    return 0;
}


#include <iostream>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    qsort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    int e=m/2;
    if(e<z)
    {
        e=z;
    }
    if(e<(y-a[x]))
    {
        e=(y-a[x]);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    double e=double(m/2.0);
    if(e<double(z))
    {
        e=z;
    }
    if(e<double(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    double y;
    cin>>x>>y;
    double a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    double m=0;
    double z=a[0];
    double d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    double e=(double(m)/(2.0000000000));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long e=(long long(m/2.0));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    double y;
    cin>>x>>y;
    double a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    double m=0;
    double z=a[0];
    double d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    double e=(double(m/2.0));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    (long long (e))=(long long(m/2.0));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    int e=m/2;
    if(e<z)
    {
        e=z;
    }
    if(e<(y-a[x]))
    {
        e=(y-a[x]);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long e=(((m)/(2.0000000000)));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=m/float(2.0);
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=float(m/2);
    if(e<float(z))
    {
        e=z;
    }
    if(e<float(y-a[x]))
    {
        e=(y-a[x]);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long p=0;
    long long e=m/2;
    if(e<(z))
    {
        e=z;
        p++;
    }
    if(e<(y-d))
    {
        e=(y-d);
        p++;
    }
    if(m%2==1&&p==0)
    {
        cout<<e+0.5<<endl;
    }
    if(m%2!=1||p==1)
    {
    cout<<e<<endl;
    }
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long p=0;
    long long e=m/2;
    if(e<(z))
    {
        e=z;
        p++;
    }
    if(e<(y-d))
    {
        e=(y-d);
        p++;
    }
    if(m%2==1&&p==0)
    {
        cout<<e+0.5<<endl;
    }
    cout<<e<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=m/2.0;
    if(e<float(z))
    {
        e=z;
    }
    if(e<float(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=float(m/2);
    if(e<float(z))
    {
        e=z;
    }
    if(e<float(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    double y;
    cin>>x>>y;
    double a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    double m=0;
    double z=a[0];
    double d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    double e=(double(m/2.0000000000000000));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=(m/2.0);
    if(e<float(z))
    {
        e=z;
    }
    if(e<float(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long double e=long double(m/2.0);
    if(e<long double(z))
    {
        e=z;
    }
    if(e<long double(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    (long double e)=(long double(m/2.0));
    if(e<(long double(z)))
    {
        e=z;
    }
    if(e<(long double(y-d)))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=2*m;
    if(e<(2*z))
    {
        e=z;
    }
    if(e<2*(y-d))
    {
        e=(y-d);
    }
    cout<<float(e/2.0)<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long p=0;
    long long e=m/2;
    if(e<(z))
    {
        e=z;
        p++;
    }
    if(e<(y-d))
    {
        e=(y-d);
        p++;
    }
    if(m%2==1&&p==0)
    {
        cout<<fixed<<setprecision(10)<<e+0.5<<endl;
    }
    if(m%2!=1||p==1)
    {
    cout<<fixed<<setprecision(10)<<e<<endl;
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=0;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long p=0;
    long long e=m/2;
    if(e<(z))
    {
        e=z;
        p++;
    }
    if(e<(y-d))
    {
        e=(y-d);
        p++;
    }
    if(m%2==1&&p==0)
    {
        cout<<fixed<<setprecision(10)<<e+0.5<<endl;
    }
    if(m%2!=1||p==1)
    {
    cout<<fixed<<setprecision(10)<<e<<endl;
    }
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    int e=m/2;
    if(e<z)
    {
        e=z;
    }
    if(e<(y-a[x]))
    {
        e=(y-a[x]);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long e=((m)/float(2.0));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long e=(long long((m)/(2.0000000000)));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    double x;
    double y;
    cin>>x>>y;
    double a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    double m=0;
    double z=a[0];
    double d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    (double e)=(double(m/2.0));
    if(e<(z)))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    double y;
    cin>>x>>y;
    double a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    double m=0;
    double z=a[0];
    double d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    double e=(double(float(m.0/2.0000000000000000)));
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long e=m/float(2);
    if(e<(z))
    {
        e=z;
    }
    if(e<(y-d))
    {
        e=(y-d);
    }
    cout<<e<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x-1];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=float(m/2.0);
    if(e<float(z))
    {
        e=z;
    }
    if(e<float(y-d))
    {
        e=(y-d);
    }
    cout<<e;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x;
    long long y;
    cin>>x>>y;
    long long a[x];
    for(long long i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    long long m=0;
    long long z=a[0];
    long long d=a[x-1];
    for(long long i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    long long e=m;
    if(e<(2*z))
    {
        e=z;
    }
    if(e<2*(y-d))
    {
        e=(y-d);
    }
    cout<<float(e/2.0)<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    float e=float(m/2);
    if(e<z)
    {
        e=z;
    }
    if(e<(y-a[x]))
    {
        e=(y-a[x]);
    }
    cout<<e;
    return 0;
}


#include <iostream>
using namespace std;
int main()
{
    int x,y;
    cin>>x>>y;
    int a[x];
    for(int i=0;i<x;i++)
    {
        cin>>a[i];
    }
    sort(a,a+x);
    int m=0;
    int z=a[0];
    int d=a[x];
    for(int i=1;i<x-1;i++)
    {
        a[i]=a[i+1]-a[i];
        if(a[i]>m)
        {
            m=a[i];
        }
    }
    int e=m/2;
    if(e<z)
    {
        e=z;
    }
    if(e<(y-a[x]))
    {
        e=(y-a[x]);
    }
    cout<<e;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    sort(A.begin(),A.end());

    float min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if((A[i+1]-A[i])/2<min)
        min=A[i+1]-A[i];
        if((A[i+1]-A[i])/2>max)
        max=A[i+1]-A[i];
    }

    if(!b)
    {
        if(A[0]<min)
        min=A[0];
        if(A[0]>max)
        max=A[0];
    }

    if(!e)
    {
        if(l-A[A.size()-1]<min)
        min=l-A[A.size()-1];
        if(l-A[A.size()-1]>max)
        max=l-A[A.size()-1];
    }

    //if(max==min)
    printf("%0.10f",max);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    sort(A.begin(),A.end());

    float min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }
    max/=2;

    if(!b)
    if(A[0]>max)
    max=A[0];

    if(!e)
    if(l-A[N-1]>max)
    max=l-A[N-1];

    printf("%0.10f",max);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    if(!b)
    A.push_back(0);
    if(!e)
    A.push_back(l);

    sort(A.begin(),A.end());

    long long int min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }

    if(max/2>=min)
    printf("%0.10f",max/2);
    else
    printf("%0.10f",min);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    if(!b)
    A.push_back(0);
    if(!e)
    A.push_back(l);

    sort(A.begin(),A.end());

    float min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }

    if(max==min)
    printf("%0.10f",min/2);
    else
    if(max/2<=min)
    printf("%0.10f",min);
    else
    printf("%0.10f",max/2);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N;long double l;
    cin>>N>>l;

    vector<long double> A;

    for(int i=0;i<N;i++)
    {
        long double x;
        cin>>x;
        A.push_back(x);
    }

    sort(A.begin(),A.end());

    float max=0;

    for(int i=0;i<N-1;i++)
    {
        if(((A[i+1]-A[i])/2)>max)
        max=A[i+1]-A[i];
    }

    if(A[0]!=0)
    {
        if(A[0]>max)
        max=A[0];
    }

    if(A[N-1]!=l)
    {
        if((l-A[N-1])>max)
        max=l-A[N-1];
    }

    printf("%0.10f",max);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long double> A;

    for(int i=0;i<N;i++)
    {
        long double x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    sort(A.begin(),A.end());

    float max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if((A[i+1]-A[i])/2>max)
        max=A[i+1]-A[i];
    }

    if(!b)
    {
        if(A[0]>max)
        max=A[0];
    }

    if(!e)
    {
        if(l-A[A.size()-1]>max)
        max=l-A[A.size()-1];
    }

    printf("%0.10f",max);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    if(!b)
    A.push_back(0);
    if(!e)
    A.push_back(l);

    sort(A.begin(),A.end());

    long long float min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }

    if(max/2<=min)
    printf("%0.10f",min);
    else
    printf("%0.10f",max/2);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    if(!b)
    A.push_back(0);
    if(!e)
    A.push_back(l);

    sort(A.begin(),A.end());

    float min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }

    if(max/2<=min)
    printf("%0.10f",min);
    else
    printf("%0.10f",max/2);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N;long long int l;
    cin>>N>>l;

    vector<long long int> A;
    vector<float> B;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
    }

    sort(A.begin(),A.end());

    if(A[0]!=0)
    B.push_back(A[0]);

    if(A[A.size()-1]!=l)
    B.push_back(l-A[A.size()-1]);

    for(int i=0;i<A.size()-1;i++)
    B.push_back((A[i+1]-A[i])/2);

    sort(B.begin(),B.end());

    printf("%0.10f",B[B.size()-1]);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    if(!b)
    A.push_back(0);
    if(!e)
    A.push_back(l);

    sort(A.begin(),A.end());

    long long int min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }

    if(max/2>min)
    printf("%0.10f",max/2);
    else
    printf("%0.10f",min);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N;long long int l;
    cin>>N>>l;

    vector<float> A,B;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
    }

    sort(A.begin(),A.end());

    if(A[0]!=0)
    B.push_back(A[0]);

    if(A[A.size()-1]!=l)
    B.push_back(l-A[A.size()-1]);

    for(int i=0;i<A.size()-1;i++)
    B.push_back((A[i+1]-A[i])/2);

    sort(B.begin(),B.end());

    printf("%0.10f",B[B.size()-1]);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    if(!b)
    A.push_back(0);
    if(!e)
    A.push_back(l);

    sort(A.begin(),A.end());

    float min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }

    if(max/2>min)
    printf("%0.10f",max/2);
    else
    printf("%0.10f",min);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N;long long int l;
    cin>>N>>l;

    vector<long long int> A,B;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
    }

    sort(A.begin(),A.end());

    if(A[0]!=0)
    B.push_back(A[0]);

    if(A[A.size()-1]!=l)
    B.push_back(l-A[A.size()-1]);

    for(int i=0;i<A.size()-1;i++)
    B.push_back((A[i+1]-A[i])/2);

    sort(B.begin(),B.end());

    printf("%0.10f",B[B.size()-1]);

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int N,b=0,e=0;long long int l;
    cin>>N>>l;

    vector<long long int> A;

    for(int i=0;i<N;i++)
    {
        long long int x;
        cin>>x;
        A.push_back(x);
        if(x==0)
        b=1;
        if(x==l)
        e=1;
    }

    if(!b)
    A.push_back(0);
    if(!e)
    A.push_back(l);

    sort(A.begin(),A.end());

    long long int min=l,max=0;

    for(int i=0;i<A.size()-1;i++)
    {
        if(A[i+1]-A[i]<min)
        min=A[i+1]-A[i];
        if(A[i+1]-A[i]>max)
        max=A[i+1]-A[i];
    }

    if(max/2<=min)
    printf("%0.10f",min);
    else
    printf("%0.10f",max/2);

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = lt(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= lt(v[i] - v[i-1], 2.0 * p);
    }
    ok &= lt(l - v[n-1], p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;
    cout << fixed << setprecision(10);

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0.0;
    hi = 1e9;
    int it = 58;
    while (it--) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-8;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n, l;
double lo, hi, best, v[maxn];

bool f(double p) {
    bool ok = true;
    double d = 2.0 * p;
    double last = v[0];
    for (int i = 1; i < n; ++i) {
        ok &= le(v[i] - last, d);
        last = v[i];
    }
    ok &= le(l - last, p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = l;

    while (abs(hi - lo) > eps) {
        best = (lo + hi)/2.0;
        //cout << lo << ' ' << best << ' ' << hi << '\n';
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(9);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n, l;
double lo, hi, best, v[maxn];

bool f(double p) {
    double d = 2.0 * p;
    double last = v[0];
    for (int i = 1; i < n; ++i) {
        if (ge(v[i] - last, d)) {
            return false;
        }
        last = v[i];
    }
    if (ge(l - last, d)) return false;
    return true;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = l;

    while (!eq(lo, hi)) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(12);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-7;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n, l;
double lo, hi, best, v[maxn];

bool f(double p) {
    bool ok = true;
    double d = 2.0 * p;
    double last = v[0];
    for (int i = 1; i < n; ++i) {
        ok &= le(v[i] - last, d);
        last = v[i];
    }
    ok &= le(l - last, p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = l;

    while (abs(hi - lo) > eps) {
        best = (lo + hi)/2.0;
        //cout << lo << ' ' << best << ' ' << hi << '\n';
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(9);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double eps = 1e-9;
const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 1e3+5;
const int mod = 1e9+7;

int n, l, v[maxn];

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    double mx = max(v[0], l - v[n-1]);
    for (int i = 1; i < n; ++i) {
    	mx = max(mx, (double)(v[i] - v[i-1])/2.0);
    }

    cout << fixed << setprecision(9) << mx << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-8;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = le(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= le(v[i] - v[i-1], 2.0 * p);
    }
    ok &= le(l - v[n-1], p);
    return ok;
}

int main() {
    //fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = l;

    while (lt(lo, hi)) {
        best = (lo + hi)/2.0;
        cout << lo << ' ' << best << ' ' << hi << '\n';
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(11);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double eps = 1e-9;
const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 1e3+5;
const int mod = 1e9+7;

int n, l, v[maxn];

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    double mx = v[0];
    for (int i = 1; i < n; ++i) {
    	mx = max(mx, (double)(v[i] - v[i-1])/2.0);
    }

    cout << fixed << setprecision(9) << mx << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    double last = v[0];
    for (int i = 1; i < n; ++i) {
        if (gt(v[i] - last, 2.0 * p)) {
            return false;
        }
        last = v[i];
    }
    if (gt(l - last, 2.0 * p)) return false;
    return true;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = 1e9;

    while (!eq(lo, hi)) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(12);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n, l;
double lo, hi, best, v[maxn];

bool f(double p) {
    double d = 2.0 * p;
    double last = -v[0];
    for (int i = 0; i < n; ++i) {
        if (gt(v[i] - last, d)) {
            return false;
        }
        last = v[i];
    }
    if (gt(l - last, d)) return false;
    return true;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0.0;
    hi = l;

    while (!eq(lo, hi)) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(12);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    double last = v[0];
    for (int i = 1; i < n; ++i) {
        if (gt(v[i] - last, 2.0 * p)) {
            return false;
        }
        last = v[i];
    }
    if (gt(l - last, 2.0 * p)) return false;
    return true;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = l;

    while (!eq(lo, hi)) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(12);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = lt(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= lt(v[i] - v[i-1], 2.0 * p);
    }
    ok &= lt(l - v[n-1], p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;
    cout << fixed << setprecision(10);

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0.0;
    hi = 1e9;
    int it = 1000;
    while (it--) {
        best = (lo + hi)/2.0;
        //cout << lo << ' ' << best << ' ' << hi << '\n';
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-8;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = le(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= le(v[i] - v[i-1], 2.0 * p);
    }
    ok &= le(l - v[n-1], p);
    return ok;
}

int main() {
    //fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = l;

    while (lt(lo, hi)) {
        best = (lo + hi)/2.0;
        //cout << lo << ' ' << best << ' ' << hi << '\n';
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(11);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-12;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
long double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = lt(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= lt(v[i] - v[i-1], 2.0 * p);
    }
    ok &= lt(l - v[n-1], p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;
    cout << fixed << setprecision(10);

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0.0;
    hi = 1e9;
    int it = 1000;
    while (lo + eps < hi) {
        best = (lo + hi)/2.0;
        //cout << lo << ' ' << best << ' ' << hi << '\n';
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = lt(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= lt(v[i] - v[i-1], 2.0 * p);
    }
    ok &= lt(l - v[n-1], p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0;
    hi = l;
    int it = 1000;
    while (it--) {
        best = (lo + hi)/2.0;
        //cout << lo << ' ' << best << ' ' << hi << '\n';
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(10);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n, l;
double lo, hi, best, v[maxn];

bool f(double p) {
    bool ok = true;
    double d = 2.0 * p;
    double last = v[0];
    for (int i = 1; i < n; ++i) {
        ok &= le(v[i] - last, d);
        last = v[i];
    }
    ok &= le(l - last, p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = max(v[0], l - v[n-1]);
    hi = l;

    while (!eq(lo, hi)) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << fixed << setprecision(12);
    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = lt(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= lt(v[i] - v[i-1], 2.0 * p);
    }
    ok &= lt(l - v[n-1], p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;
    cout << fixed << setprecision(10);

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0.0;
    hi = 1e9;
    int it = 62;
    while (it--) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = lt(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= lt(v[i] - v[i-1], 2.0 * p);
    }
    ok &= lt(l - v[n-1], p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;
    cout << fixed << setprecision(10);

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0.0;
    hi = 1e9;
    int it = 65;
    while (it--) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << lo << '\n';

    return 0;
}


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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

const double eps = 1e-9;

#define eq(a, b) (abs(a - b) < eps)
#define lt(a, b) ((a + eps) < b)
#define gt(a, b) (a > (b + eps))
#define le(a, b) (a < (b + eps))
#define ge(a, b) ((a + eps) > b)

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const int dt[] = {0, 1, 0, -1, 0};
const int dtx[] = { 0, 0,  1, 1, 1, -1, -1, -1};
const int dty[] = {-1, 1, -1, 0, 1, -1,  0,  1};
const int dtxc[] = {1,  1, 2,  2, -1, -1, -2, -2};
const int dtyc[] = {2, -2, 1, -1,  2, -2,  1, -1};

const double pi = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int maxn = 2e5+5;
const int mod = 1e9+7;

int n;
double lo, hi, best, l, v[maxn];

bool f(double p) {
    bool ok = lt(v[0], p);
    for (int i = 1; i < n; ++i) {
        ok &= lt(v[i] - v[i-1], 2.0 * p);
    }
    ok &= lt(l - v[n-1], p);
    return ok;
}

int main() {
    fastIO();
    cin >> n >> l;
    cout << fixed << setprecision(10);

    for (int i = 0; i < n; ++i) {
    	cin >> v[i];
    }

    sort(v, v+n);

    lo = 0.0;
    hi = 1e9;
    int it = 55;
    while (it--) {
        best = (lo + hi)/2.0;
        if (f(best)) hi = best;
        else lo = best;
    }

    cout << lo << '\n';

    return 0;
}