class Temps:
    def __init__(self,h,m,s):
        self.h, self.m, self.s = h, m, s

    def affiche(self):
        return '{} h {} min {} s'.format(str(self.h), str(self.m), str(self.s))

    def __add__(self,t):
        sec = self.s + t.s
        rs = sec % 60
        minute = self.m + t.m + sec//60
        rm = minute % 60
        rh = self.h + t.h + minute//60
        return Temps(rh,rm,rs)

    def __sub__(self,t):
        a = self.h*3600 + self.m*60 + self.s
        b = t.h*3600 + t.m*60 + t.s
        diff = abs(b-a)
        h = diff // 3600
        m = (diff-3600*h)//60
        s = diff-3600*h-60*m
        return Temps(h,m,s)
