private String cipher_digraph(String pl,HashMap<Character,Pair<Integer> > h1, HashMap<Character,Pair<Integer>> h2)
	 {
		 assert(pl.length()==2);
		 StringBuilder sb=new StringBuilder();
		 char c1=pl.charAt(0);
		 char c2=pl.charAt(1);
		 if(c1=='J')
		 {
			 c1='I';
		 }
		 if(c2=='J')
		 {
			 c2='I';
		 }
		 if(!h1.containsKey(Character.valueOf(c1)) || !h2.containsKey(Character.valueOf(c2)))
		 {
			 System.err.println("Error in finding keys in hashmap");
		 }
		 Pair<Integer> p1=h1.get(Character.valueOf(c1));
		 Pair<Integer> p2=h2.get(Character.valueOf(c2));
		 
		 if(p1.get_first()==p2.get_first())
		 {
			 sb.append(c2);
			 sb.append(c1);
			 return sb.toString();
		 }
		 else
		 {
			 sb.append(square2[p1.get_first()][p2.get_second()]);
			 sb.append(square1[p2.get_first()][p1.get_second()]);
			 return sb.toString();
		 }
	}