
vert1 = input()
vert2 = input()
vert3 = input()


if(vert1 == 'vertebrado' and vert2 == 'ave' and vert3 == 'carnivoro'):
	print('aguia')
elif(vert1 == 'vertebrado' and vert2 == 'ave' and vert3 == 'ovinovo'):
	print('pomba')
elif(vert1 == 'vertebrado' and vert2 == 'mamifero' and vert3 == 'onivoro'):
	print('homem')
elif(vert1 == 'vertebrado' and vert2 == 'mamifero' and vert3 == 'herbivoro'):
	print('vaca')
elif(vert1 == 'invertebrado' and vert2 == 'inseto' and vert3 == 'hematofago'):
	print('pulga')
elif(vert1 == 'invertebrado' and vert2  == 'inseto' and vert3 == 'herbivoro'):
	print('lagarta')
elif(vert1 == 'invertebrado' and vert2 == 'anelideo' and vert3 == 'hematofago'):
	print('sanguessuga')
elif(vert1 == 'invertebrado' and vert2 == 'anelideo' and vert3 == 'onivoro'):
	print('minhoca')
