import numpy as np

if __name__ == "__main__":
    N = int(input().strip())
    F_c = list(map(int, input().strip().split()))

    F = np.poly1d(F_c)

    H = F(np.poly1d([1, -1]))

    H_c = H.coeffs.astype(int)

    print(" ".join(map(str, H_c)))