import random


class Dice:
    def __init__(self, sides):
        self.sides = sides

    def roll(self):
        return random.randint(1, self.sides)


class FourSide(Dice):
    def __init__(self):
        Dice.__init__(self, 4)


class SixSide(Dice):
    def __init__(self):
        Dice.__init__(self, 6)


class EightSide(Dice):
    def __init__(self):
        Dice.__init__(self, 8)


class TwelveSide(Dice):
    def __init__(self):
        Dice.__init__(self, 12)


class TwentySide(Dice):
    def __init__(self):
        Dice.__init__(self, 20)


four = FourSide()
print(four.roll())

six = SixSide()
print(six.roll())

eight = EightSide()
print(eight.roll())

twelve = TwelveSide()
print(twelve.roll())

twenty = TwentySide()
print(twenty.roll())