#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main ()
{
string a,b,c;
cin>>a>>b>>c;
if(a=="vertebrado")
{
if(b=="ave")
{
if(c=="onivoro") cout<<"pomba";
else cout<<"aguia";
}
else
if(c=="onivoro") cout<<"homem";
else cout<<"vaca";
}
else
{
if (b=="inseto")
{
if(c=="herbivoro") cout<<"lagarta";
else cout<<"pulga";
}
else
if(c=="onivoro") cout<<"minhoca";
else cout<<"sanguessuga";
}
return 0;
}