All Submissions


Given a string with distinct characters,you are supposed to print all its anagrams in sorted order.

length of string <=8


Input contains many Strings,Read till End of File

For each input string print its anagrams in sorted order,one per line

Output of 2 consequtive cases must be seperated by a newline


INPUT:
acm
bit

OUTPUT:
acm
amc
cam
cma
mac
mca

bit
bti
ibt
itb
tbi
tib

Problem Setter : Jayant Mukherji

Languages: Brain,C,C++,Java,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 1 Second(s)
Score: 0 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0