#222. 递归移动字符'x'到末尾

    ID: 222 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-2gesp5递归字符串

递归移动字符'x'到末尾

Move 'x' to End

Background

Congcong is playing a word game. He noticed that some letters are mischievous and always want to move to the end of the line. He asks for your help to move all lowercase 'x' characters to the end of a given string.

Problem Description

Given a string, compute recursively a new string where all the lowercase 'x' characters have been moved to the end of the string.

Input Format

Input is given from Standard Input in the following format.

s

Output Format

Output is printed to Standard Output in the following format.

result_string

Sample

xxre
rexx
xxhixx
hixxxx
xhixhix
hihixxx

Sample Explanation

For the sample input xxre, the two 'x' characters in the string are moved to the end, resulting in rexx.

Constraints

Time limit: 1 second, Memory limit: 1024 KiB for each test case.