import java.util.Arrays;
class Solution {
public long solution(long n)
{
char[] charArray = String.valueOf(n).toCharArray();
Arrays.sort(charArray);
char[] temp = new char[charArray.length];
for( int i = 0; i < charArray.length; i++)
{
temp[i] = charArray[charArray.length-i-1];
}
long answer = Long.parseLong(String.valueOf(temp));;
return answer;
}
}