Synchrony Interview Question

Given a String ="abcd" and asked to print all the combinations in it