public static char[][] generate_bifid_square(String keyword)
	{
		boolean[] alpha=new boolean[26];
		char[][] square=new char[5][5];
		int cur_row=0;
		int cur_col=0;
		//write the keyword to the square in a clockwise spiral
		for(char c:keyword.toLowerCase().toCharArray())
		{
			
			if(c=='j')
			{
				c='i';
				//index='i'-'a';
			}
			int index=c-'a';
			if(!alpha[index])
			{
				square[cur_row][cur_col]=(char)(c+'A'-'a');
				//spiral
				alpha[index]=true;
				//modify cur_row,cur_col
			    Pair<Integer> next_pos=Generic_Func.traverse_spiral(cur_row, cur_col, 5);
			    cur_row=next_pos.get_first();
			    cur_col=next_pos.get_second();
			}	
		}
		for(int i=0;i<26;i++)
		{
			if (i==9 || alpha[i]==true)
				continue;
			else if(!alpha[i])
			{
				square[cur_row][cur_col]=(char)('A'+i);
				//spiral
				alpha[i]=true;
				//modify cur_row,cur_col
			    Pair<Integer> next_pos=Generic_Func.traverse_spiral(cur_row, cur_col, 5);
			    cur_row=next_pos.get_first();
			    cur_col=next_pos.get_second();
			}
		    
		}
		return square;
		
	}