Janea Systems interview question

Write code that prints all combinations given a string and k