#include <iostream>
#include <string>
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
int k=0,maks=0,s=0;
vector<pair<int,int>>ciag;
cin >> n;
for(int i=0;i<n.length();++i){
maks=max(s,maks);
if(n[i]=='+') {
if(k==1){
k=0;
ciag.push_back({0,1});
maks=max(s,maks);
s=0;
}
ciag.push_back({1,0});
s++;
}
else{
k++;
if(k==2){
k=0;
ciag.push_back({1,0});
s+=1;
}
}
}
for(int i=0;i<ciag.size();++i){
cout << ciag[i].first << ' ' << ciag[i].second << endl;
}
maks=max(s,maks);
cout << maks;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJc3RyaW5nIG47CglpbnQgaz0wLG1ha3M9MCxzPTA7Cgl2ZWN0b3I8cGFpcjxpbnQsaW50Pj5jaWFnOwoJY2luID4+IG47Cglmb3IoaW50IGk9MDtpPG4ubGVuZ3RoKCk7KytpKXsKCQltYWtzPW1heChzLG1ha3MpOwoJCWlmKG5baV09PScrJykgewoJCQlpZihrPT0xKXsKCQkJCWs9MDsKCQkJCWNpYWcucHVzaF9iYWNrKHswLDF9KTsKCQkJCW1ha3M9bWF4KHMsbWFrcyk7CgkJCQlzPTA7CgkJCX0KCQkJY2lhZy5wdXNoX2JhY2soezEsMH0pOwoJCQlzKys7CgkJfQoJCWVsc2V7CgkJCWsrKzsKCQkJaWYoaz09Mil7CgkJCQlrPTA7CgkJCQljaWFnLnB1c2hfYmFjayh7MSwwfSk7CgkJCQlzKz0xOwoJCQl9CgkJCQkKCQl9Cgl9Cglmb3IoaW50IGk9MDtpPGNpYWcuc2l6ZSgpOysraSl7CgkJY291dCA8PCBjaWFnW2ldLmZpcnN0IDw8ICcgJyA8PCBjaWFnW2ldLnNlY29uZCA8PCBlbmRsOwoJfQoJbWFrcz1tYXgocyxtYWtzKTsKCWNvdXQgPDwgbWFrczsKICAgIHJldHVybiAwOwp9