private String generate_ct(char[] keyed_alphabet,char[][] trans_block, int[] num_k, String plain)
	{
		String plain_l=plain.toLowerCase();
		StringBuilder sb=new StringBuilder();
		int init_num=num_k.length<5?num_k.length:5;
		for(int i=0;i<init_num;i++)
		{
			sb.append(num_k[i]);
		}
		assert(num_k.length==plain.length());
		for(int i=0;i<num_k.length;i++)
		{
			int ka_pos=num_k[i];
			int pt_pos=plain_l.charAt(i)-'a';
			int pos=pt_pos+ka_pos>=26?pt_pos+ka_pos-26:pt_pos+ka_pos;	
			sb.append(keyed_alphabet[pos]);
		}
		sb.append(num_k[num_k.length-1]);
		return sb.toString();
	}