private void solve(int pos, char prev) {
		if (pos == L) {
			cnt++;
		}
		for (char c = 0; c <= 26; c++) {
			if (prev != c && map[c] > 0) {
				map[c]--;
				solve(pos + 1, c);
				map[c]++;
			}
		}
	}