Time Limit: Java: 1000 ms / Others: 1000 ms
Memory Limit: Java: 32768 KB / Others: 32768 KB
Given a string of no more than 1000 characters. You are supposed to sort the characters into a substring of all Z's followed by O's, J's, 7's, and the rest of the other characters.
For each test case, output the resulting string. Note the order of the characters other than Z, O, J and 7 must be kept after sorting.