#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; while(n--){ string s; cin>>s; if(s.length()==5){ // 如果字串長度為5,輸出3 cout<<3<<endl; } // 檢查有多少個字符與'o','n','e'匹配 else if((s[0]=='o')+(s[1]=='n')+(s[2]=='e')>=2){ // 如果有至少2個字符與'one'匹配,輸出1 cout<<1<<endl; } else{ cout<<2<<endl; // 如果以上條件都不符合,輸出2 } } }