#include #include #include using namespace std; #define inRange(x,a,b) (a <= x && x <= b) void check(string s){ assert((int)(s.length()) <= 10); for(char c : s) assert(inRange(c, 'a', 'z')); } int main(){ queue q; for(char c : "kadomatsu") q.push(c); string s; cin >> s; for(char c : s){ while(!q.empty() && q.front() != c) q.pop(); if(q.empty()){ cout << "No" << endl; return 0; } q.pop(); } cout << "Yes" << endl; check(s); return 0; }