N = int(eval(input()))

an = [0] + [int(i) for i in input().split()]+[0]

t = sum([abs(an[i+1]-an[i]) for i in range(N+1)])

ts = []

for i in range(N):

  a,b,c = an[i:i+3]

  ts.append(t+(0 if 0 <= (a-b)*(b-c) else -2*(min(abs(a-b),abs(b-c)))))

print(('\n'.join(map(str,ts))))

N = int(eval(input()))

an = [0] + [int(i) for i in input().split()]+[0]

cn = [abs(an[i+1]-an[i]) for i in range(N+1)]

ct = sum(cn)

cs = [ct-cn[i]-cn[i+1]+abs(an[i]-an[i+2]) for i in range(N)]

print(('\n'.join(map(str,cs))))

N = int(eval(input()))
an = [0] + [int(i) for i in input().split()] + [0]
t = sum([abs(an[i + 1] - an[i]) for i in range(N + 1)])
ts = []
for i in range(N):
    a, b, c = an[i : i + 3]
    ts.append(t + (0 if 0 <= (a - b) * (b - c) else -2 * (min(abs(a - b), abs(b - c)))))
print(("\n".join(map(str, ts))))

N = int(eval(input()))
an = [0] + [int(i) for i in input().split()] + [0]
cn = [abs(an[i + 1] - an[i]) for i in range(N + 1)]
ct = sum(cn)
cs = [ct - cn[i] - cn[i + 1] + abs(an[i] - an[i + 2]) for i in range(N)]
print(("\n".join(map(str, cs))))

-t = sum([abs(an[i + 1] - an[i]) for i in range(N + 1)]) -ts = [] -for i in range(N): -    a, b, c = an[i : i + 3] -    ts.append(t + (0 if 0 <= (a - b) * (b - c) else -2 * (min(abs(a - b), abs(b - c))))) -print(("\n".join(map(str, ts)))) +cn = [abs(an[i + 1] - an[i]) for i in range(N + 1)] +ct = sum(cn) +cs = [ct - cn[i] - cn[i + 1] + abs(an[i] - an[i + 2]) for i in range(N)] +print(("\n".join(map(str, cs))))