#include <utility>
#include <string>
#include <iostream>
#include <vector>
#include <list>
#include <sstream>
std::string response(
const std::vector<std::pair<std::vector<std::string>,std::string>>& cmds,
const std::string& cmd){
std::list<std::pair<std::vector<std::string>,std::string>>
temp_ls (cmds.begin(),cmds.end());
std::istringstream iss(cmd);
std::string temp ;
int tk_c = -1;
while(std::getline(iss,temp,' ')){
tk_c++;
for(int i=0;i<temp.size();++i){
for(auto it = temp_ls.begin();it != temp_ls.end();){
if(it->first.size() <= tk_c ||
it->first.at(tk_c).at(i) != temp.at(i)){
auto jt = it;
it++;
temp_ls.erase(jt);
}else{
it++;
}
}
}
}
if(temp_ls.size() > 1){
for(auto it = temp_ls.begin();it != temp_ls.end();){
if(it->first.size() > tk_c+1){
auto jt = it;
it++;
temp_ls.erase(jt);
}
else{it++;}
}
}
if(temp_ls.size() != 1){return "unknown command";}
return temp_ls.back().second;
}
int main(){
std::vector<std::pair<std::vector<std::string>,std::string>> cmds {
{{"reset"} ,"reset what"},
{{"reset","board"}, "board fault"},
{{"board","add"} ,"where to add"},
{{"board","delete"} ,"no board at all"},
{{"reboot","backplane"}, "impossible"},
{{ "backplane","abort"}, "install first"},
};
std::string input_cmd;
while(std::getline(std::cin,input_cmd)){
std::cout << response(cmds,input_cmd) << std::endl;
}
return 0;
}