public static int function(char[] keys, char[] values,
			HashMap<Character, Character> map,
			ArrayList<HashMap<Character, Character>> list)
	{
		if (keys.length == 1)
		{
			map.put(keys[0], values[0]);
			list.add(map);
			return 0;
		}

		for (int i = 0; i < keys.length; i++)
		{
			HashMap<Character, Character> newMap = (HashMap<Character, Character>) map
					.clone();
			newMap.put(keys[0], values[i]);
			char[] newKeys = new char[keys.length - 1];
			char[] newValues = new char[values.length - 1];
			for (int j = 1; j < keys.length; j++)
			{
				System.out.println(j + " " + keys.length);
				newKeys[j - 1] = keys[j];
				if (j < i)
					newValues[j] = values[j];
				else
					newValues[j - 1] = values[j];
				function(newKeys, newValues, newMap, list);
			}
		}
		return 0;
	}