#include <iostream> #include <stack> using namespace std; void output(string str) { stack<char> ch; for(int i =0;i<str.size();i++) { if((str[i]=='o')&&(ch.empty()==true)) { ch.push(str[i]); } else if((str[i]=='o')&&(ch.empty()!=true)) { if(ch.top()=='o') { ch.pop...