def solve(string):

    n, *a = list(map(int, string.split()))

    a = [0] + a + [0]

    base = sum([abs(j - i) for i, j in zip(a, a[1:])])

    ans = []

    for i in range(1, n + 1):

        if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]):

            ans.append(str(base))

        elif max(a[i - 1], a[i + 1]) < a[i]:

            ans.append(str(base - 2 * abs(a[i] - max(a[i - 1], a[i + 1]))))

        else:

            ans.append(str(base - 2 * abs(a[i] - min(a[i - 1], a[i + 1]))))

    return "\n".join(ans)





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

def solve(string):

    n, *a = list(map(int, string.split()))

    a = [0] + a + [0]

    base = sum([abs(j - i) for i, j in zip(a, a[1:])])

    ans = []

    for a0, a1, a2 in zip(a, a[1:], a[2:]):

        if min(a0, a1, a2) == a1:

            ans.append(str(base - 2 * abs(a1 - min(a0, a2))))

        elif max(a0, a1, a2) == a1:

            ans.append(str(base - 2 * abs(a1 - max(a0, a2))))

        else:

            ans.append(str(base))

    return "\n".join(ans)





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

def solve(string):
    n, *a = list(map(int, string.split()))
    a = [0] + a + [0]
    base = sum([abs(j - i) for i, j in zip(a, a[1:])])
    ans = []
    for i in range(1, n + 1):
        if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]):
            ans.append(str(base))
        elif max(a[i - 1], a[i + 1]) < a[i]:
            ans.append(str(base - 2 * abs(a[i] - max(a[i - 1], a[i + 1]))))
        else:
            ans.append(str(base - 2 * abs(a[i] - min(a[i - 1], a[i + 1]))))
    return "\n".join(ans)


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

def solve(string):
    n, *a = list(map(int, string.split()))
    a = [0] + a + [0]
    base = sum([abs(j - i) for i, j in zip(a, a[1:])])
    ans = []
    for a0, a1, a2 in zip(a, a[1:], a[2:]):
        if min(a0, a1, a2) == a1:
            ans.append(str(base - 2 * abs(a1 - min(a0, a2))))
        elif max(a0, a1, a2) == a1:
            ans.append(str(base - 2 * abs(a1 - max(a0, a2))))
        else:
            ans.append(str(base))
    return "\n".join(ans)


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

-    for i in range(1, n + 1): -        if min(a[i - 1], a[i + 1]) <= a[i] <= max(a[i - 1], a[i + 1]): +    for a0, a1, a2 in zip(a, a[1:], a[2:]): +        if min(a0, a1, a2) == a1: +            ans.append(str(base - 2 * abs(a1 - min(a0, a2)))) +        elif max(a0, a1, a2) == a1: +            ans.append(str(base - 2 * abs(a1 - max(a0, a2)))) +        else: -        elif max(a[i - 1], a[i + 1]) < a[i]: -            ans.append(str(base - 2 * abs(a[i] - max(a[i - 1], a[i + 1])))) -        else: -            ans.append(str(base - 2 * abs(a[i] - min(a[i - 1], a[i + 1]))))