import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.util.ArrayList; /** * * @author cteam29 */ public class ith { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String line; while(!( line = reader.readLine()).equals("0 0 0")){ String[] l= line.split(" "); int a = Integer.valueOf(l[0]); int b = Integer.valueOf(l[1]); int number = Integer.valueOf(l[2]); for(int i=0; i queens = new ArrayList(); public static class Queen{ public int i; public int j; public Queen(int i, int j) { this.i = i; this.j = j; } } }