a,b,c = float(input()), float(input()), float(input())
if a >= 0:
a = a ** 2
else:
a = a ** 4
if b >= 0:
b = b ** 2
b = b ** 4
if c >= 0:
c = c ** 2
c = c ** 4
print(a,b,c)
a,b,c = float(input()), float(input()), float(input())
if a >= 0:
a = a ** 2
else:
a = a ** 4
if b >= 0:
b = b ** 2
else:
b = b ** 4
if c >= 0:
c = c ** 2
else:
c = c ** 4
print(a,b,c)