#define _USE_MATH_DEFINES #include //cin, cout #include //vector #include //sort,min,max,count #include //string,getline, to_string #include //fixed #include //setprecision #include //swap, pair #include //abs(int) #include //sqrt,ceil,M_PI, pow, sin #include //stringstream, getline #include //gcd, accumlate #include //deque #include //randam_device #include //numeric_limits using namespace std; constexpr long long int D_MOD = 1000000007; int main() { string S; cin >> S; if (S.length() < 8) { cout << "No" << endl; return 0; } if (S.find("kadomatsu") != string::npos) { cout << "Yes" << endl; return 0; } string target = "kadomatsu"; string temp = S; for (unsigned int i = 0; i < target.length(); i++) { for (unsigned int j = 0; j <= temp.length(); j++) { temp.insert(temp.begin() + j, target[i]); if (temp.find(target) != string::npos) { cout << "Yes" << endl; return 0; } temp = S; } } cout << "No" << endl; return 0; }