Convert a string into another string

Company: IBM sde

Difficulty: medium