#include <bits/stdc++.h>
using namespace std;
int main()
{
vector<int> v;
string s;
int i = 0;
while (getline(cin, s) && s != ".")
{
i++;
if (s.find("chi1 huo3 guo1", 0) != -1)
v.push_back(i);
}
cout << i << endl;
if (v.size()) cout << v.front() << ' ' << v.size();
else puts("-_-#");
return 0;
}