#include<bits/stdc++.h>
using namespace std;
#define int long long
const int maxn = 5e5 + 5;
struct node{
int a, b, cnt, mx;
} st[4 * maxn];
int n, m, d;
node merge(node l, node r){
return {min(r.a, l.a - d * r.cnt), max(r.b + l.cnt * d, l.b), l.cnt + r.cnt, max({l.mx, r.mx, r.b - l.a})};
}
void update(int id, int l, int r, int p, int val){
if(l == r) st[id].a = -val, st[id].b = d - val, st[id].cnt = 1;
else{
int mid = (l + r) / 2;
if(p <= mid) update(id * 2, l, mid, p, val);
else update(id * 2 + 1, mid + 1, r, p, val);
st[id] = merge(st[id * 2], st[id * 2 + 1]);
}
}
void solve(){
cin >> n >> m >> d;
if(m <= 20){
vector<int> a(n + 1);
for(int i = 1; i <= n; i++) cin >> a[i];
auto check = [&](int x){
long double y = x;
vector<long double> cur(a.size(), 0);
cur[0] = -1e15;
for(int i = 1; i < a.size(); i++){
cur[i] = max(a[i] - y / 2, cur[i - 1] + d);
if(cur[i] > a[i] + y / 2) return false;
}
return true;
};
for(int i = 1; i <= m; i++){
int x; cin >> x;
a.push_back(x);
sort(a.begin() + 1, a.end());
int l = 0, r = 1e16, ans = 1e16;
while(l <= r){
int mid = (l + r) / 2;
if(check(mid)) ans = mid, r = mid - 1;
else l = mid + 1;
}
cout << ans / 2;
if(ans & 1) cout << ".5";
cout << " ";
}
}else{
vector<int> order(n + m + 1), a(n + m + 1);
for(int i = 1; i <= n + m; i++) cin >> a[i];
for(int i = 1; i <= n + m; i++) order[i] = i;
sort(order.begin() + 1, order.end(), [&](int x, int y){
return a[x] < a[y] || (a[x] == a[y] && x < y);
});
for(int i = 1; i < 4 * maxn; i++) st[i].a = 1e18, st[i].mx = 0, st[i].b = -1e18, st[i].cnt = 0;
for(int i = 1; i <= n + m; i++){
update(1, 1, n + m, order[i], a[i]);
if(i > n){
cout << st[1].mx / 2;
if(st[1].mx % 2 == 1) cout << ".5";
cout << " ";
}
}
}
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
solve();
}