Print all possible strings of length k that can be formed from a set of n characters