use std::io;
use std::str;
use std::usize;
use std::cmp;

fn main() {
    let inf = 1000000007;
    let x = read_values::<i64>()[0];
    let k = read_values::<usize>()[0];
    let r = {
        let mut v: Vec<i64> = read_values::<i64>();
        v.push(inf);
        v
    };
    let q = read_values::<usize>()[0];
    let (t, a) = {
        let mut t = vec![inf; q + 1];
        let mut a = vec![inf; q + 1];
        for i in 0..q {
            let v = read_values::<i64>();
            t[i] = v[0];
            a[i] = v[1];
        }
        (t, a)
    };

    let mut y = 0;
    let mut w = 0;
    let mut z = x;
    let mut r_head = 0;
    let mut t_head = 0;
    let mut prev_turn = 0;
    let mut up = true;
    while r_head < k || t_head < q {
        if r[r_head] < t[t_head] {
            // turn
            let time = r[r_head] - prev_turn;
            if up {
                y -= time;
                if y < 0 && y.abs() > w {
                    w = y.abs();
                }
            } else {
                y += time;
                if y > 0 && x - (y) < z {
                    z = x - (y);
                }
            }

            z = cmp::max(z, 0);
            w = cmp::min(w, x);
            up = !up;
            prev_turn = r[r_head];
            r_head += 1;
        } else {
            // query
            let time = t[t_head] - prev_turn;
            let mut ans = if a[t_head] > z {
                z + y
            } else if a[t_head] < w {
                w + y
            } else {
                a[t_head] + y
            };

            if up {
                ans -= time;
            } else {
                ans += time;
            }
            ans = cmp::min(x, ans);
            ans = cmp::max(0, ans);

            println!("{}", ans);
            t_head += 1;
        }
    }
}

fn read_line() -> String {
    let stdin = io::stdin();
    let mut buf = String::new();
    stdin.read_line(&mut buf).unwrap();
    buf
}

fn read_values<T>() -> Vec<T>
    where T: std::str::FromStr,
          T::Err: std::fmt::Debug
{
    read_line()
        .split(' ')
        .map(|a| a.trim().parse().unwrap())
        .collect()
}