class Animal:
#adapted from WIKIPEDIA.COM
    def __init__(self, name):    # Constructor of the class
        self.name = name

class Cat(Animal):
    def talk(self):
        return 'Meow!'
 
class Dog(Animal):
    def talk(self):
        return 'Woof! Woof!'

class Cow(Animal):
    def talk(self):
        return 'Moo!'

c1=Cat('joey')
animals = [Cat('felix'),
           Dog('rover'),
           Cow('betsy')]
 
for animal in animals:
    print (animal.name + ': ' + animal.talk())
 
# prints the following:
#
# felix: Meow!
# rover: Woof! Woof!
# betsy: Moo!
