#39709: __加油


yp11251123@yphs.tp.edu.tw (704-39黃楷博)


#include<bits/stdc++.h>;
using namespace std;
int main()
{
 
int n;
cin>>n;
while(n--)
{
string s;
cin>>s;
if(s.size()==5) {cout<<3<<endl; continue;}
int wrong=0;
if(s[0]!='o') wrong++;
if(s[1]!='n') wrong++;
if(s[2]!='e') wrong++;
if(wrong<=1) cout<<1<<endl;
else cout<<2<<endl;
}