
import Data.Array (Array, listArray, accumArray, (!))
import Data.List (sortOn, sortBy)
import Control.Monad (forM_)
import qualified Data.Vector as V

lowerBound x xs = go xs (-1) (V.length xs) where
  go xs l r
    | l==r-1 = r
    | x==(xs V.! m) = m
    | x<=(xs V.! m) = go xs l m
    | otherwise = go xs m r
    where m = (l+r) `div` 2
{-# INLINE lowerBound #-}

inf = 10^11

v !* i
  | i==(-1) = -inf
  | i==(V.length v) = inf
  | otherwise = v V.! i

a # b = abs (a-b)
{-# INLINE (#) #-}

solv ss ts qs = forM_ (V.toList qs) calc where
  cost x s t = min ((x#s)+(s#t)) ((x#t)+(t#s))
  calc q =
    let i = lowerBound q ss
        j = lowerBound q ts
        sr = ss !* i
        sl = ss !* (i-1)
        tr = ts !* j
        tl = ts !* (j-1)
    in print $! minimum [ min (q#sr + sr#tr) (q#tr + tr#sr)
                        , min (q#sr + sr#tl) (q#tl + tl#sr)
                        , min (q#sl + sl#tr) (q#tr + tr#sl)
                        , min (q#sl + sl#tl) (q#tl + tl#sl)
                        ]

main = do
  [a,b,q] <- map read . words <$> getLine :: IO [Int]
  ys <- V.fromList . map read . words <$> getContents :: IO (V.Vector Int)
  let ss = V.slice 0 a ys
      ts = V.slice a b ys
      qs = V.slice (a+b) q ys
  solv ss ts qs
