Find all permutations of a given string in lexicographical order.

Using "abcd" output should be
abcd
abdc
acbd
acdb
adcb
adbc
.
.
.