import java.util.*;
public class Main
{
public static void main(String[] args)
{
int number;
int exponent;
System.out.print("Base: ");
number = Integer.parseInt(new Scanner(System.in).nextLine());
System.out.print("Exponent: ");
exponent = Integer.parseInt(new Scanner(System.in).nextLine());
System.out.printf("%1$s^%2$s=%1$s" + "\r\n", Power(number, exponent));
}
public static int Power(int number, int exponent)
{
if (exponent == 0)
{
return 1;
}
else
{
return number * Power(number, exponent - 1);
}
}
}