static char[] sol(char[] s){
		TreeMap<Character,TreeSet<Character>> mapa=new TreeMap<Character, TreeSet<Character>>();
		for(int i=0;i<arr[0].length;i++)
			for(int j=0;j<arr[0][i].length;j++)
				for(int h=0;h<arr[1][i].length;h++)
					if(s[arr[0][i][j]-'A']=='\0'&&esPosible(arr[0][i][j], arr[1][i][h], s)){
						TreeSet<Character> set=mapa.get(arr[0][i][j]);
						if(set==null)set=new TreeSet<Character>();
						set.add(arr[1][i][h]);
						mapa.put(arr[0][i][j], set);
					}
		boolean ws=false;
		for(Entry<Character,TreeSet<Character>> entry:mapa.entrySet()){
			if(entry.getValue().size()==1){
				s[entry.getKey()-'A']=entry.getValue().first();
				ws=true;
			}
		}
		if(ws){
			char[] s1=sol(s.clone());
			return s1.clone();
		}else return s.clone();
	}