from sys import stdininput = stdin.readlinea,b = map(int,input().split())while a!=0 and b!=0: print(a**b) a,b = map(int,input().split())