arr = [int(i) for i in input().split()] p = int(input()) for i in arr: print(i ** p, end=" ")