SORTING - Sorting is easy

no tags 

 

Do you think sorting is easy?

try your luck
in brainfuck

 

For those who don't know that brainfuck is a programming language: Take a look at the converter to C. It will ignore every unknown command, therefore submitting a program in any other language won't necessarily lead to compile error, but certainly not to Accepted.

Input

The input consists of a line of up to 1000 uppercase letters, terminated with a '\n' character (ASCII value 10).

Output

The output should contain a line consisting of the same characters as the input line, but in non-descending order.

Example

Input:

BRAINFUCK

Output:

ABCFIKNRU


hide comments
Vamsi Krishna Avula: 2014-12-12 09:13:37

Its easier than I expected and of course had a good time debugging.

Martijn Muijsers: 2014-01-09 02:24:47

Boom AC in one go! Thinking about it, writing it and debugging it all took me a long time, and I learned a lot! :)

Mitch Schwartz: 2013-08-18 14:05:14

I've seen it also on http://www.spoj.com/SHORTEN/problems/ODDBF/ , maybe it's a bug on SPOJ that happens very rarely.

ওয়াসী (Wasi): 2013-08-18 13:26:01

Strange! the problem setter is the best solver. I've never seen this type of thing before.I've tried to solve my own problem FIZZBUZZ(though a tutorial one :P) but my solution didn't appear in the best solver list.
Is it possible for a problem setter to participate in his own problem??

: 2012-07-10 06:50:43

Be careful with the '\n'....!!!
3 TLE becoz of that..!!!!

Jitesh: 2011-11-03 10:17:36

Thnx.....

Adrian Kuegel: 2011-11-02 14:29:57

you don't print the 'Z's

Jitesh: 2011-11-02 07:38:57

Firstly i got a TLE n now its giving me a WA....Can any one give some test cases...

Adrian Kuegel: 2010-08-23 10:55:13

you need to use brainfuck (check wikipedia if you don't know about it)

BACK: 2010-08-22 08:28:01

which language have 2 use...


Added by:Adrian Kuegel
Date:2004-11-04
Time limit:1s
Source limit:500B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:BF
Resource:own problem