• + 0 comments

    n = list(input()) n.sort() lower, upper, odd, even = '', '', '', '' for i in n: if i.islower(): lower += i elif i.isupper(): upper += i elif i.isdigit() and int(i)%2 == 1: odd += i elif i.isdigit() and int(i)%2 == 0: even += i print(lower+upper+odd+even)