public class Sah { static void sah(int a) { for(int j = 0; j < a; j++) { for(int i = 0; i < a; i++) { if((i + j) % 2 == 0) { System.out.print("1"); } else { System.out.print("2"); } } System.out.println(); } } public static void main(String[] args) { // TODO Auto-generated method stub sah(8000); } }