private static Boolean check(int[][] in)
	{
		for (int i = 0; i < 9; i++)
		{
			int[] bc = new int[9];
			int[] br = new int[9];
			int[] bb = new int[9];
			for (int j = 0; j < 9; j++)
			{
				// check for repetition				
				if (in[i][j] > 0)
				{
					if (bc[in[i][j] - 1] > 0)
						return false;
					bc[in[i][j] - 1] = 1;
				}

				if (in[j][i] > 0 ){
					if (br[in[j][i] - 1] > 0)
						return false;
					br[in[j][i] - 1] = 1;
				}



				int ind = in[3*(int)(i/3) + (int)(j/3)][3*(i%3) + j%3] - 1;
				//				System.out.printf("[%d %d][%d, %d][%d]\n", i,j, 3*(int)(i/3) + (int)(j/3), 3*(i%3) + j%3, ind);
				if (ind > 0)
				{
					if (bb[ind] > 0)
						return false;
					bb[ind] = 1;
				}
			}
		}
		return true;
	}