Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????

		Scanner scan = new Scanner(System.in);
		
		// ?????????????????????
		Dise dise = new Dise();
		// ?????¢?????°??????????????????
		for(int i = 0; i < 6; i++) {
			dise._values[i] = scan.nextInt();
		}
		//??????????????°???????????????
		int q = scan.nextInt();
		// ???????????°????????°?????????
		for(int i = 0; i < q; i++) {
			// ??????
			int top = scan.nextInt();
			int front = scan.nextInt();
			boolean check = false;
			
			// ?¢????
			for(int i2 = 0; i2<4; i2++) {
				// ?????¢????¢????
				if (dise._values[1] == front) {
					// ?????¢????????£????????????????????¢??????????????§??????
					for(int i3 = 0; i3 < 4; i3++) {
						if (dise._values[0] == top) {
							System.out.println(dise._values[2]);
							check = true;
							break; //i3-1
						}
						else dise.MoveEast();
					}
				}
				else {
					dise.MoveSouth();
				}
				if (check == true) break; //i2
			}
			if (check == false) {
				dise.MoveEast();
				dise.MoveSouth();
				// ?????¢????¢????
				if (dise._values[1] == front) {
					// ?????¢????????£????????????????????¢??????????????§??????
					for(int i3 = 0; i3 < 4; i3++) {
						if (dise._values[0] == top) {
							System.out.println(dise._values[2]);
							check = true;
							break; // i3-2
						}
						else dise.MoveEast();
					}
				}
				else { 
					dise.MoveSouth();
					dise.MoveSouth();
					// ?????¢????????£????????????????????¢??????????????§??????
					for(int i3 = 0; i3 < 4; i3++) {
						if (dise._values[0] == top) {
							System.out.println(dise._values[2]);
							check = true;
							break; // i3-3
						}
						else dise.MoveEast();
					}
				}
			}
		}
		
	}
}

// ??????????????????
class Dise2 {

	public int _values[] = new int[6];
	
	public void Dice(int values[]) {
    	for (int i = 0; i < values.length; i++)
    	this._values[i] = values[i];
	}
    
    public enum ValueType
    {
        Top,
        Front,
        Right,
        Left,
        Back,
        Bottom
    }
    
    // memo 0:top, 1:front, 2:r, 3:l, 4:back, 5:bottom
    public void MoveWest()
    {
        int tmp = this._values[0];
        this._values[0] = this._values[2];
        this._values[2] = this._values[5];
        this._values[5] = this._values[3];
        this._values[3] = tmp;
    }
    public void MoveEast()
    {
        int tmp = this._values[0];
        this._values[0] = this._values[3];
        this._values[3] = this._values[5];
        this._values[5] = this._values[2];
        this._values[2] = tmp;
    }
    public void MoveNorth()
    {
        int tmp = this._values[0];
        this._values[0] = this._values[1];
        this._values[1] = this._values[5];
        this._values[5] = this._values[4];
        this._values[4] = tmp;
    }
    public void MoveSouth()
    {
        int tmp = this._values[0];
        this._values[0] = this._values[4];
        this._values[4] = this._values[5];
        this._values[5] = this._values[1];
        this._values[1] = tmp;
    }


}

Compiler output:
Main.java:11: error: cannot find symbol
		Dise dise = new Dise();
		^
  symbol:   class Dise
  location: class Main
Main.java:11: error: cannot find symbol
		Dise dise = new Dise();
		                ^
  symbol:   class Dise
  location: class Main
2 errors