private boolean solve_num(int row,int col,int[][] result)
	{
		int sq=result.length;
		if(row==sq || col==sq)
			return true;
	//	if(result[row][col]!=0)
		//	return true;
		ArrayList<Integer> cands=new ArrayList<Integer>();
		/*	for(int i=0;i<filled.length;i++)
		{
			if(!filled[i] && is_valid(i+1,result,row,col))
			{
				cands.add(i+1);
			}
			/*if(!filled[i])
			{
				cands.add(i+1);
			}*/
		//}
		for(int i=1;i<=sq;i++)
		{
			if(is_valid(i,result,row,col))
			{
				cands.add(i);
			}
		}
		Random r=new Random();
		while(cands.size()!=0)
		{
			int select=r.nextInt(cands.size());
			result[row][col]=cands.get(select);
			 boolean next=false;
			 if(col<sq-1)
			 {
				 // next=solve_num(row,col+1,next_filled,candidates,result);
				 next=solve_num(row,col+1,result);
			 }
			 else
			{
				 // next=solve_num(row+1,0,next_filled,candidates,result);
				  next=solve_num(row+1,0,result);
			}
			 if(next)
			 {
				 result[row][col]=cands.get(select);
				 return true;
			 }
			 else
			 {
				 cands.remove(select);
			 }
		}
		return false;
	
		
	
		
	}