将给定的字符串作为密码，并编写一个程序，生成所有可能的四个字符的排列。


密码：abcd
Possible permutations of the password "abcd" are:

- abcd
- abdc
- acbd
- acdb
- adbc
- adcb
- bacd
- badc
- bcad
- bcda
- bdac
- bdca
- cabd
- cadb
- cbad
- cbda
- cdab
- cdba
- dabc
- dacb
- dbac
- dbca
- dcab
- dcba

A program to generate these permutations can be written using recursion or iteration, and there are many examples available online.