Please help me to understand and extract

input is of string type . And output it has to write string only .