CODEM6 - Problem6

 

Since, Bhavik is very good at solving coding problems so his friend Anurag comes up with a problem. Anurag wanted to decompress the data that was sent by his girlfriend before he read it. So he turns to Bhavik for help.This time you need to perform run length decoding on a given string but with a little bit twist.You need to print the number of occurrences of each character as specified in the input string only if the count of the character modulo 2 is greater than 0 otherwise just print the same character along with its count .

Input

Input consists of multiple lines of strings s(only lowercase letters a-z), one string per line,  with |s| <= 100000 (read the input till EOF)

 

Output

For each input string, output a single line printing the run length decoding of the input string

 

Example

Input:
a4
a4b3 Output: a4
a4bbb

Added by:Bhavik
Date:2014-02-04
Time limit:0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:own problem(for CODE MARATHON)

hide comments
2019-06-08 00:32:22
The occurrences can be more than 9
2018-07-26 20:59:04
Note that char occurences are not necessarily single-digit numbers and in fact up to 10^6.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.