Help me in solving AOJ19 problem

My issue

i did not reach to the solutions please help

My code

import java.util.*;

class Codechef
	public static void main (String[] args)
		Scanner read = new Scanner(;
		int t = read.nextInt();
		for(int i=0; i<t; i++)
		    ArrayList<Integer> face = new ArrayList<Integer>();
		    int n = read.nextInt();
		    int a = read.nextInt();
		    int b = read.nextInt();
		    // Update the code below to solve this problem

		  //  ArrayList<Integer> a=new ArrayList<Integer>();
		    for(int j=0;j<n;j++)
		     int c1=2;
		     int c2=0;
		       for(int j=0 , k=n-1; j<=n-1 && k>=1 ;j++,k--)
		         if((face.get(j)==a && face.get(j+1)==b) && (face.get(k-1)==a && face.get(k)==b))
		           for(int j=0 , k=n-1; j<=n-1 && k>=1 ;j++,k--)
		           System.out.println(j+" "+k);

Learning course: Solve Programming problems using Java
Problem Link: CodeChef: Practical coding for everyone