#include <iostream>
#include <string>

class Animal
{
 public:
  virtual void eat() const
  {
    std::cout << name << " isst" << std::endl;
  }
  void rename(const std::string& newName)
  {
    name = newName;
  }
 protected:
  std::string name;
};

void feed(const Animal& animal)
{
  animal.eat();
}
int main()
{
  Animal animal;
  animal.rename("Leila");
  feed(animal);
  return 0;
}
