private String get_sub_ct(char[][] pt, int start_col,int end_col,int[][] key_square)
	{
		
		int row=pt.length;
		char[][] result_ct=new char[row][end_col-start_col];
		StringBuilder sb=new StringBuilder();
		for(int i=start_col;i<end_col;i++)
		{
			//find the correct position for each column
			for(int j=0;j<row;j++)
			{
				if(pt[j][i]=='\0')
					continue;
				result_ct[key_square[j][i-start_col]-1][i-start_col]=pt[j][i];
				/*if(pt[j][i]!='\0')
				{
				  sb.append(pt[j][i]);
				}*/
			}
		}
		for(int i=0;i<end_col-start_col;i++)
		{
			for(int j=0;j<row;j++)
			{
				if(result_ct[j][i]!='\0')
				{
					sb.append(result_ct[j][i]);
				}
			}
		}
		return sb.toString();
	}