class Heure:
    def __init__(self, heures = 0, minutes = 0):
        assert heures >= 0 and minutes >= 0
        self.heures = heures
        self.minutes = minutes
        self.invariant()

    def incrementer(self):
        self.invariant()

        #pour la post-condition
        minutesAvant = self.minutes
        heuresAvant = self.heures

        if (self.minutes < 59):
            self.minutes = self.minutes+1
        else:
            self.minutes = 0
            if self.heures < 23:
                self.heures = self.heures + 1
            else:
                self.heures = 0
        #POSTCONDITION
        #minutesAvant < 59 => minutes = minutesAvant+1
        assert minutesAvant == 59 or self.minutes == minutesAvant+1
        #minutesAvant = 59 & heuresAvant < 23 => minutes = 0 et heures = heuresAvant+1
        assert minutesAvant !=59 or heuresAvant == 23 or (self.heures == heuresAvant+1 and self.minutes == 0)
        # minutesAvant = 59 & heuresAvant = 59 => minutes = 0 et heures = 0
        assert minutesAvant != 59 or heuresAvant != 59 or (self.heures == 0 and self.minutes == 0)

        self.invariant()

    def __repr__(self):
        return repr(self.heures)+":"+repr(self.minutes)

    def invariant(self):
        assert self.heures >= 0 and self.heures < 24
        assert self.minutes >= 0 and self.minutes < 60

heure = Heure()
for i in range(0,1440):
    heure.incrementer()
    print(heure)