#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
stringstream test1{"\r\n"},
test2{"\r"},
test3{"\n"};
string o1, o2, o3;
getline(test1, o1, '\n');
getline(test2, o2, '\n');
getline(test3, o3, '\n');
cout << o1.size() << endl
<< o2.size() << endl
<< o3.size() << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgc3RyaW5nc3RyZWFtIHRlc3QxeyJcclxuIn0sCiAgICAgICAgICAgICAgICAgdGVzdDJ7IlxyIn0sCiAgICAgICAgICAgICAgICAgdGVzdDN7IlxuIn07CiAgICAKICAgIHN0cmluZyBvMSwgbzIsIG8zOwogICAgZ2V0bGluZSh0ZXN0MSwgbzEsICdcbicpOwogICAgZ2V0bGluZSh0ZXN0MiwgbzIsICdcbicpOwogICAgZ2V0bGluZSh0ZXN0MywgbzMsICdcbicpOwogICAgCiAgICBjb3V0IDw8IG8xLnNpemUoKSA8PCBlbmRsCiAgICAgICAgIDw8IG8yLnNpemUoKSA8PCBlbmRsCiAgICAgICAgIDw8IG8zLnNpemUoKSA8PCBlbmRsOwogICAgCiAgICByZXR1cm4gMDsKfQ==