406008: GYM102218 A Alan's Birthday

Memory Limit:64 MB Time Limit:0 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Alan's Birthdaytime limit per test1.25 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

Filiberto is very careful when giving gifts to any of his friends.

He has found in the street a string $$$S$$$ containing only lowercase English characters and he remembered that his friend Alan is a lover of strings!

When Alan sees a string, he immediately searches in his very weird dictionary (one that contains all the possible string letters) for that word in lexicographically order until he finds it and learns its meaning. But Alan does not like to spend a lot of time looking in the dictionary or he will become angry.

As Alan's birthday is coming soon, Filiberto wants to give him the string $$$S$$$ as a gift, but he does not want Alan to become angry because it could take a lot of time to look for its meaning in the dictionary.

Filiberto can rearrange the string $$$S$$$ by changing the order of the characters of the string. As Filiberto is focused on creating new problems for the 11th edition of the Annual Programming Contest, he asks you to solve the following problem:

Given the string $$$S$$$, you need to print the best rearrangement of the string to give to Alan as a gift.

Input

The first contains an integer $$$N$$$ $$$(1 \le N \le 10^7)$$$ - representing the length of the string.

The second line contains a string $$$S$$$ consisting of lowercase English characters - the string Filiberto has found in the street.

Output

Output one line containing the best rearrangement of the string $$$S$$$ to give to Alan as a gift.

ExamplesInput
3
mac
Output
acm
Input
4
geso
Output
egos

加入题单

算法标签: