class Temps:
    def __init__(self, h, m, s):
        self.h = h
        self.m = m
        self.s = s
        
    def __str__(self):
        return str(self.h) + ":" + str(self.m) + ":" + str(self.s)
    
    def __repr__(self):
        return "Temps(" + str(self.h) + ", " + str(self.m) + ", " + str(self.s)+")"
    
    def ajouter(self, other):
        t = Temps(self.h + other.h, self.m + other.m, self.s + other.s)
        if t.s >= 60:
            t.s = t.s - 60
            t.m = t.m + 1
        if t.m >= 60:
            t.m += -60
            t.h += 1
        return t
    
    def __add__(self, other):
        return self.ajouter(other)
        
t1 = Temps(1,2,3)
print(t1)
print(repr(t1))
t2 = Temps(1,57,58)
print(t1+t2)