import numpy as np arr = np.array([list(map(int,input().split()))for i in range(2)]) arr=arr*arr*arr for i in arr:print(*i)