#include<iostream> #include<string> #include<math.h> using namespace std; int main() { string str; while (getline(cin, str)) { int&n...