A valid parentheses string is empty, `"(" + A + ")"`, or `A + B`, where `A` and `B` are valid. A non-empty valid string is primitive if it cannot be split into two non-empty valid strings. Any valid string `s` can be written uniquely as `P1 + P2 + ... + Pk` with each `Pi` primitive. Given a valid string `s`, remove the outermost pair of parentheses of every primitive in that decomposition and return the result.
A valid parentheses string is empty, "(" + A + ")", or A + B, where A and B are valid. A non-empty valid string is primitive if it cannot be split into two non-empty valid strings. Any valid string s can be written uniquely as P1 + P2 + ... + Pk with each Pi primitive. Given a valid string s, remove the outermost pair of parentheses of every primitive in that decomposition and return the result.