2 10 1 1 1
1
10
1
1 5 1 8
 4 4 1 0 1
1

1
1 2 1 4
 2 5 1 0 1
2

1
1 4 1 5
 10 10 1 8 4
10
2 3 4 5 6 7 8 9
10
1 1 3 1
2 1 7 1
1 1 9 1
7 1 4 1
10 1 7 1
2 1 7 1
3 1 2 1
5 1 2 1
10 1 5 1
6 1 9 1
 2 4 1 1 1
1
4
1
1 2 1 3
 2 2 0 1 1

1
1
1 2 2 2
 1000 1000 1 1 10
1
2
1
1 900 1 1000
 5 5 1 1 1
3
2
1
1 5 1 1
 2 4 1 1 1
1
2
1
2 3 2 4
 4 4 1 0 1
4

5
1 1 2 2
1 3 2 2
3 3 4 3
3 2 2 2
1 2 2 3

3
 2
 1
 3
4
4
3
3
4
3
3
4
3
 1
 3
 100
 4
 1
 6
4
3
5
4


// Problem : A. Stairs and Elevators
// Contest : Codeforces - VK Cup 2018 - Round 3
// URL : https://codeforces.com/problemset/problem/925/A
// Memory Limit : 256 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include<bits/stdc++.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp> 
// #include <ext/pb_ds/tree_policy.hpp> 
// using namespace __gnu_pbds;
// #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
// /*
    // EXAMPLE
        // set is {1, 5, 6, 17, 88}, ie ordered_set oset;
        // *(oset.find_by_order(2)) : 3rd element in the set i.e. 6
        // oset.order_of_key(6) : Count of elements strictly smaller than 6 is 2.
// */
#define int long long
#define endl '\n'
#define vi vector<int>
#define vb vector<bool>
#define vp vector<pair<int,int>>
#define mod 1000000007
#define M_PI 3.14159265358979323846
#define pint pair<int,int>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,b,a) for(int i=b; i>=a ;--i)
#define mms(a,n) memset(a,n,sizeof(a))
#define fill(a,value) fill(a.begin(),a.end(),value)
#define all(a) a.begin(),a.end()
#define n_ones(x) __builtin_popcountll(x)
#define pb push_back
#define fi first
#define se second
#define see(args...)                       \
{                                            \
    cerr<<"LINE "<<__LINE__;                 \
    string _s = #args;                       \
    replace(_s.begin(), _s.end(), ',', ' '); \
    stringstream _ss(_s);                    \
    istream_iterator<string> _it(_ss);       \
    err(_it, args);                          \
    cerr<<endl;                              \
}
void err(istream_iterator<string> it){}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args)
{
  cerr<<' '<< *it << " = " << a ;
  err(++it, args...);
} 
inline void op() { cout <<'\n'; } 
template <typename T, typename... Types> inline void op(T var1, Types... var2) { cout << var1 << ' ' ; op(var2...) ;} 
inline void ip() {} 
template <typename T, typename... Types> inline void ip(T &var1, Types&... var2) { cin>>var1; ip(var2...) ;}
template <typename T, typename U>inline void min_self(T &x, U y){if (y < x)x = y;}
template <typename T, typename U>inline void max_self(T &x, U y){if (x < y)x = y;}
template<class T1, class T2>ostream& operator<< (ostream &out, pair<T1, T2> pair) { return out << "(" << pair.first << ", " << pair.second << ")";}
template<class T> ostream& operator<<(ostream& out, vector<T> vec) { for (auto& v: vec) out<<v<<' '; return out<<"\n"; }
template<class T> ostream& operator<<(ostream& out, set<T> vec) { out<<"("; for (auto& v: vec) out<<v<<", "; return out<<")"; }
template<class L, class R> ostream& operator<<(ostream& out, map<L, R> vec) { out<<"("; for (auto& v: vec) out<<"["<<v.first<<", "<<v.second<<"]"; return out<<")"; }
template<class A,class B>istream&operator>>(istream&in,pair<A,B>&a){return in>>a.first>>a.second;}
template<class A>istream&operator>>(istream&in,vector<A>&a){for(A &i:a)in>>i;return in;}
template <class Container>
void split(const std::string& str, Container& cont, char delim = ',')
{
    stringstream ss(str);
    string token;
    while (std::getline(ss, token, delim)) {
        cont.push_back(token);
    }
}

// cout << fixed << setprecision(10) << pi <<" "<<npi<<endl; 
// INT64_MAX
// transform(all(s), s.begin(), ::tolower);

int px[4] = {-1,0,1,0};
int py[4] = {0,-1,0,1};
struct edge{
    int u, v,wt;
    edge(int a = 0, int b = 0, int c = 0) : u(a),v(b),wt(c){}
    bool operator<(edge const& other){
        return wt<other.wt;
    }
    friend ostream& operator<<(ostream& out,const edge &x){ return out<<"("<<x.u<<", "<<x.v<<", "<<x.wt<<")";}
};



void abcd(){
    int n,m,cs,cl,v, res = 0, x1, x2, y1, y2, q;
	ip(n,m,cs,cl,v);
    vi stair(cs), lift(cl);
    ip(stair, lift);
    sort(all(stair));
    sort(all(lift));
    ip(q);
    while(q--){
    	ip(x1, y1, x2, y2);
		int a1 = INT_MAX, a2 = INT_MAX;
		auto it1 = lower_bound(all(stair), y1);
		if(it1 != stair.end()){
			min_self(a1, abs(*it1 - y1) + abs(*it1 - y2) + abs(x1 - x2));
		}
		if(it1 != stair.begin() && !stair.empty()){
			it1--;
			min_self(a1, abs(*it1 - y1) + abs(*it1 - y2) + abs(x1 - x2));
		}
		auto it2 = lower_bound(all(lift), y1);  
		if(it2 != lift.end()){
			min_self(a2, abs(*it2 - y1) + abs(*it2 - y2) + (abs(x1 - x2) + v - 1) / v);
		}
		if(it2 != lift.begin() && !lift.empty()){
			it2--;
			min_self(a2, abs(*it2 - y1) + abs(*it2 - y2) + (abs(x1 - x2) + v - 1) / v);
		}
		op(min(a1, a2));
    }
    return;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int t=1;
    // cin>>t;
    while(t--)
    {
        abcd();
    }
    return 0;
}
