# [1678. Goal Parser Interpretation](https://leetcode.com/problems/goal-parser-interpretation/) ![](https://i.imgur.com/EdC1iD6.png) ![](https://i.imgur.com/hsAYwYO.png) char * interpret(char * command){ int n=0; for(int i=0;i<strlen(command);i++) { if(command[i]=='G') { command[n]='G'; } else if(command[i]=='('&&command[i+1]==')') { command[n]='o'; i++; } else if(command[i]=='('&&command[i+1]=='a') { command[n]='a'; command[n+1]='l'; i=i+3; n++; } n++; } command[n]='\0'; return command; }