Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

// I/O
type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func (s *Scanner) nextFloatSlice(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextFloat()
	}
	return res
}

// Arithmetic
func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

// Sort
type Val struct {
	id, num int
}
type ByNum []Val

func (a ByNum) Len() int           { return len(a) }
func (a ByNum) Less(i, j int) bool { return a[i].num < a[j].num }
func (a ByNum) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

func main() {
	sc := NewScanner()
	wtr := bufio.NewWriter(os.Stdout)
	N, M := sc.nextInt(), sc.nextInt()
	m := sc.nextIntSlice(M)
	m = append(m, N)
	Q := sc.nextInt()
	l := sc.nextIntSlice(Q)
	base := m[0] - 1
	sums := make([]int, N+1)
	for i := 1; i <= M; i++ {
		var diff int
		if i != M {
			diff = m[i] - m[i-1] - 1
		} else {
			diff = m[i] - m[i-1]
		}
		for j := 0; j < diff; j++ {
			sums[j+1] += diff - j
		}
	}
	for _, allow := range l {
		ok := N + 1
		ng := 0
		for abs(ok-ng) > 1 {
			mid := (ok + ng) / 2
			if base+sums[mid] <= allow {
				ok = mid
			} else {
				ng = mid
			}
		}
		if ok == N+1 {
			fmt.Fprintln(wtr, -1)
		} else {
			fmt.Fprintln(wtr, ok)
		}
	}

	wtr.Flush()
}

Python: from bisect import bisect_left
def inpl(): return list(map(int, input().split()))

N, M = inpl()
X = inpl()
Q = int(input())
L = inpl()

X += [N+1]
initcost = X[0] - 1
costs = [X[i+1] - X[i] - 1 for i in range(M) if X[i+1] - X[i] > 1]
C = [0]*(N+1)
C[0] = - 10**9

for i in range(1, N+1):
    cost = 0
    costs2 = []
    for c in costs:
        cost += c
        if c > 1:
            costs2.append(c-1)
    C[i] = - (initcost + cost)
    costs = costs2

for l in L:
    if l < - C[-1]:
        print(-1)
    else:
        print(bisect_left(C, -l))

Python: #!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
"""
n,m = LI()
a = LI()
b = LI()
li = list(set(a)|set(b))
li2 = list(set(a)&set(b))
li.sort()
li2.sort()
print(len(li2),len(li))
for i in li2:
    print(i)
for i in li:
    print(i)
"""

#B
"""
n = I()
p = LI()
ans = [None for i in range(2*n)]
ind = [i for i in range(n)]
for i in range(n):
    ind[p[i]-1] = i
l = 0
print(ind)
for i in range(n):
    while ans[l] != None:l += 1
    ans[l] = "("
    r = n+ind[i]
    while ans[r] != None:r += 1
    ans[r] = ")"
    print(ans)
k = []
q = []
a = 1
print(ans)
for i in range(2*n):
    if ans[i] == "(":
        q.append(a)
        a += 1
    else:
        k.append(q.pop(-1))
if k != p:
    print(":(")
else:
    for i in range(2*n-1):
        print(ans[i],end = "")
    print(ans[-1])
"""

#C
"""
def fact(n):
    i = 2
    a = n
    if n < 4:
        return [1,n],[n]
    li = [1,n]
    while i**2 <= a:
        if n%i == 0:
            li.append(i)
            if i != n//i:
                li.append(n//i)
        i += 1
    li.sort()
    i = 2
    if len(li) == 2:
        return li,[a]
    k = []
    b = a
    while i**2 <= b:
        if a%i == 0:
            k.append(i)
            while a%i == 0:
                a//= i
        i += 1
    if a!=1:
        k.append(a)
    return li,k
n = I()
l,k = fact(n)
if len(l) == 2:
    print(1,1)
else:
    print(len(k),len(l)-1)
"""

#D
n,m = LI()
a = LI()
f = [0 for i in range(n+1)]
for i in range(1,m):
    f[a[i]-a[i-1]-1] += 1
f[n-a[-1]] += 1
s = 0
k = [0 for i in range(n+1)]
for i in range(n)[::-1]:
    s += f[i]
    k[i] += s+k[i+1]
for i in range(n+1):
    k[i] += a[0]-1
q = I()
p = LI()
for i in p:
    l = 0
    r = n
    while r-l>1:
        m = (l+r)//2
        if k[m] > i:
            l = m
        else:
            r = m
    if k[r] > i:
        print(-1)
    else:
        print(r)
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Python: import bisect

n,m = map(int,input().split())
pos = list(map(int,input().split()))
q = int(input())
l = list(map(int,input().split()))

pos.append(n+1)
d = [pos[i+1]-pos[i]-1 for i in range(m)]
d.sort()
s = [0]*(m+1)
for i in range(len(d)):
    s[i+1] = s[i]+d[i]

for lim in l:
    ok = n+1
    ng = 0
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        idx = bisect.bisect_left(d,mid)
        cost = (s[-1]-s[idx]) - (m-idx)*(mid-1) + (pos[0]-1)
        if cost <= lim:
            ok = mid
        else:
            ng = mid
    if ok <= n:
        print(ok)
    else:
        print(-1)

C++: #include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>
#include <stack>


using namespace std;
using ll = long long;
using ull = unsigned long long;

const ll INF = 1e16;
const ll MOD = 1e9 + 7;

#define REP(i, n) for(ll i = 0; i < n; i++)






int main() {
    ll n, m;
    cin >> n >> m;
    queue<pair<ll, ll>> que;
    ll mn;
    REP(i, m){
        ll t;
        cin >> t;
        que.push({t, 0});
        if(i == 0) mn = t;
    }
    vector<bool> used(n + 1);
    vector<ll> res(n + 1, n);
    ll cnt = 0, len = 1;
    while(!que.empty()){
        auto tmp = que.front(); que.pop();
        ll x = tmp.first, loop = tmp.second;
        if(loop >= len){
            res[len] = n - cnt;
            len++;
        }
        if(x > n || used[x]) continue;
        used[x] = true;
        cnt++;
        que.push({x + 1, loop + 1});
    }
    ll mn2 = n;
    for(ll i = 1; i <= n; i++){
        mn2 = min(mn2, res[i]);
        res[i] = mn2;
    }
    ll q;
    cin >> q;
    REP(i, q){
        ll l;
        cin >> l;
        if(l < mn - 1){
            cout << -1 << endl;
            continue;
        }
        ll ng = 0, ok = n;
        while(ok - ng > 1){
            ll m = (ok + ng) / 2;
            if(res[m] <= l){
                ok = m;
            }
            else{
                ng = m;
            }
        }
        cout << ok << endl;
    }
}