1. 


/**
* Applied mathematics, SS09, IFB 2C
* ACM Problem #11115 - Uncle Jack
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=problem_stats&problemid=2056&category=23
*
* @author Lermer Florian
* @author Hidir Sayli
* @author Taskin Umut
*
* Status : Accepted
* Runtime: 1.008
*
* Problems: Well the Runtime again using bigInteger takes more than 250 ms
* but couldn´t find other ways to solve the problem
*/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class Main {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line=br.readLine();
while(!line.equals("0 0"))
{
StringTokenizer st=new StringTokenizer(line);
System.out.println(new BigInteger(st.nextToken()).pow(Integer.parseInt(st.nextToken())));
line=br.readLine();
}
}

}