public char[][] fill_grille(int[] position,String plain)
	{
		assert(position.length==4);
		assert(plain.length()<=16);
		int total_len=plain.length();
		char[][] result=new char[4][4];
		int[] cur_holes=new int[4];
		for (int i=0;i<4;i++)
		{
			
			cur_holes[i]=position[i];
			//System.err.println(cur_holes[i]);
		}
		int str_pos=0;//string position
		for(int i=0;i<4;i++)
		{
			//compute each position and fill the hole
			//fill the hole
			for(int j=0;j<4;j++)
			{
			  int cur_row=(cur_holes[j])/4;
			  int cur_col=(cur_holes[j])%4;
			  if(str_pos<total_len)
			  {
				  result[cur_row][cur_col]=plain.charAt(str_pos);
				  str_pos++;
			  }
			  else
			  {
				  break;
			  }
			  int temp=cur_row;
			  //turn 90 degrees clockwise
			  cur_row=cur_col;
			  cur_col=4-1-temp;
			  int pos=cur_row*4+cur_col;
			  cur_holes[j]=pos;
			}
			if(str_pos>=total_len)
			{
				break;
			}
			Arrays.sort(cur_holes);
		/*	if(i<plain.length())
			{
			  result[cur_row][cur_col]=plain.charAt(i);
			}*/
			/*for(int j=0;j<3;j++)
			{
			  int temp=cur_row;
			  //turn 90 degrees clockwise
			  cur_row=cur_col;
			  cur_col=4-1-temp;
			  int cur_pos=i+4*(j+1);
			  if(cur_pos<plain.length())
			  {
			    result[cur_row][cur_col]=plain.charAt(cur_pos);
			  }
			}*/
			
		}
		return result;
	}