Language: Java

import java.util.*;

public class Dice{
	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);
		int[] in = new int[6];
		for(int i = 0; i < 6; i++){
			in[i] = scan.nextInt();
		}
		int T = in[0];
		int S = in[1];
		int E = in[2];
		int W = in[3];
		int N = in[4];
		int U = in[5];

		int q = scan.nextInt();
		for(int i = 0; i < q; i++){
			int n = scan.nextInt();
			int m = scan.nextInt();
			boolean flg = false;
			while(true){
				if(m == S){
					if(n == T){
						flg = true;
						break;
					} else{
						MoveEast();
					}
				} else{
					MoveSouth();
				}
				
			}
			System.out.println(E);
		}

	}

	public void MoveSouth(){
		int a = T;
		T = N;
		N = U;
		U = S;
		S = a;
	}
	public void MoveEast(){
		int a = T;
		T = W;
		W = U;
		U = E;
		E = a;
	}
	public void MoveNorth(){
		int a = T;
		T = S;
		S = U;
		U = N;
		N = a;
	}
	public void MoveWest(){
		int a = T;
		T = E;
		E = U;
		U = W;
		W = a;
	}
}

Compiler output:
Main.java:3: error: class Dice is public, should be declared in a file named Dice.java
public class Dice{
       ^
Main.java:29: error: non-static method MoveEast() cannot be referenced from a static context
						MoveEast();
						^
Main.java:32: error: non-static method MoveSouth() cannot be referenced from a static context
					MoveSouth();
					^
Main.java:42: error: cannot find symbol
		int a = T;
		        ^
  symbol:   variable T
  location: class Dice
Main.java:43: error: cannot find symbol
		T = N;
		^
  symbol:   variable T
  location: class Dice
Main.java:43: error: cannot find symbol
		T = N;
		    ^
  symbol:   variable N
  location: class Dice
Main.java:44: error: cannot find symbol
		N = U;
		^
  symbol:   variable N
  location: class Dice
Main.java:44: error: cannot find symbol
		N = U;
		    ^
  symbol:   variable U
  location: class Dice
Main.java:45: error: cannot find symbol
		U = S;
		^
  symbol:   variable U
  location: class Dice
Main.java:45: error: cannot find symbol
		U = S;
		    ^
  symbol:   variable S
  location: class Dice
Main.java:46: error: cannot find symbol
		S = a;
		^
  symbol:   variable S
  location: class Dice
Main.java:49: error: cannot find symbol
		int a = T;
		        ^
  symbol:   variable T
  location: class Dice
Main.java:50: error: cannot find symbol
		T = W;
		^
  symbol:   variable T
  location: class Dice
Main.java:50: error: cannot find symbol
		T = W;
		    ^
  symbol:   variable W
  location: class Dice
Main.java:51: error: cannot find symbol
		W = U;
		^
  symbol:   variable W
  location: class Dice
Main.java:51: error: cannot find symbol
		W = U;
		    ^
  symbol:   variable U
  location: class Dice
Main.java:52: error: cannot find symbol
		U = E;
		^
  symbol:   variable U
  location: class Dice
Main.java:52: error: cannot find symbol
		U = E;
		    ^
  symbol:   variable E
  location: class Dice
Main.java:53: error: cannot find symbol
		E = a;
		^
  symbol:   variable E
  location: class Dice
Main.java:56: error: cannot find symbol
		int a = T;
		        ^
  symbol:   variable T
  location: class Dice
Main.java:57: error: cannot find symbol
		T = S;
		^
  symbol:   variable T
  location: class Dice
Main.java:57: error: cannot find symbol
		T = S;
		    ^
  symbol:   variable S
  location: class Dice
Main.java:58: error: cannot find symbol
		S = U;
		^
  symbol:   variable S
  location: class Dice
Main.java:58: error: cannot find symbol
		S = U;
		    ^
  symbol:   variable U
  location: class Dice
Main.java:59: error: cannot find symbol
		U = N;
		^
  symbol:   variable U
  location: class Dice
Main.java:59: error: cannot find symbol
		U = N;
		    ^
  symbol:   variable N
  location: class Dice
Main.java:60: error: cannot find symbol
		N = a;
		^
  symbol:   variable N
  location: class Dice
Main.java:63: error: cannot find symbol
		int a = T;
		        ^
  symbol:   variable T
  location: class Dice
Main.java:64: error: cannot find symbol
		T = E;
		^
  symbol:   variable T
  location: class Dice
Main.java:64: error: cannot find symbol
		T = E;
		    ^
  symbol:   variable E
  location: class Dice
Main.java:65: error: cannot find symbol
		E = U;
		^
  symbol:   variable E
  location: class Dice
Main.java:65: error: cannot find symbol
		E = U;
		    ^
  symbol:   variable U
  location: class Dice
Main.java:66: error: cannot find symbol
		U = W;
		^
  symbol:   variable U
  location: class Dice
Main.java:66: error: cannot find symbol
		U = W;
		    ^
  symbol:   variable W
  location: class Dice
Main.java:67: error: cannot find symbol
		W = a;
		^
  symbol:   variable W
  location: class Dice
35 errors