Iris Software interview question

String generation from the given string