string postToInfix(string s) {
// Write your code here.
int n = s.size();
stack<string>st;
for(int i = 0; i< n; i++){
if((s[i] >= 'A' && s[i] <= 'Z') || (s[i] >= 'a' &&
s[i] <= 'z') || (s[i] >= '0' && s[i] <= '9'))
st.push(string(1,s[i]));
else{
string s1 = st.top();
st.pop();
string s2 = st.top();
st.pop();
st.push('(' + s2 + s[i] + s1 + ')');
}
}
return st.top();
}