String conversion

0

0 votes
Easy
Problem

Given a string S containing distinct lowercase alphabets, convert it in such a way that at every index of S,the index and the ascii value of the character at that particular index are  either both odd or both even and among all the converted strings print the one which comes first according to dictionary.The converted string must have the same characters as that of original string.Given S is such that conversion of string in above manner is always possible. 
NOTE - assume 0 based indexing.

CONSTRAINTS:

1<= length of string S <=26

INPUT:

the string S

OUTPUT:

print the converted string

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?