def humantime(t: int) ->str:
    """seconds -> XhYmZs"""
    m, s = divmod(t, 60)
    h, m = divmod(m, 60)
    d, h = divmod(h, 24)
    ret = ''
    if d:
        ret += '%dd' % d
    if h:
        ret += '%dh' % h
    if m:
        ret += '%dm' % m
    if s:
        ret += '%ds' % s
    return ret
