For this Question: Given four integers a, b, c, and d. Find the value of a<sup>(b<sup>(c<sup>d</sup>)</sup>)</sup> modulo 1000000007.

(Fact: 0<sup>0</sup> = 1)The first and the only line of input contains 4 integers a, b, c, and d.

Constraints
1 <= a, b, c, d <= 12Output a single integer, the answer modulo 1000000007.Sample Input
2 2 2 2

Sample Output
65536

Explanation
2^(2^(2^2)) = 2^(2^4) = 2^16 = 65536.

Sample Input
0 7 11 1 

Sample Output
0, I have written this Solution Code: import java.io.*;
import java.util.*;
import java.math.*;



class Main {
	public static void main (String[] args)throws IOException {


		BufferedReader sc= new BufferedReader(new InputStreamReader(System.in));
		int a=0, b=0, c=0, d=0;
		long z=0;
		String[] str;
			str = sc.readLine().split(" ");
			a= Integer.parseInt(str[0]);
			b= Integer.parseInt(str[1]);
			c= Integer.parseInt(str[2]);
			d= Integer.parseInt(str[3]);

		BigInteger m = new BigInteger("1000000007");
		BigInteger n = new BigInteger("1000000006");
		BigInteger zero = new BigInteger("0");
		BigInteger ans, y;

		if(d==0){
			z =1;
		}else{
			z = (long)Math.pow(c, d);
		}

		if(b==0){
			y= zero;
		}else{
			y = (BigInteger.valueOf(b)).modPow((BigInteger.valueOf(z)), n);
		}

		if(y == zero){
			System.out.println("1");
		}else if(a==0){
			System.out.println("0");
		}else{
			ans = (BigInteger.valueOf(a)).modPow(y, m);
			System.out.println(ans);
		}

	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?