def format_seconds(seconds: int) ->str:
    """Given a number of seconds format as X hours, X minutes, X seconds"""
    minutes, rseconds = divmod(seconds, 60)
    hours, rminutes = divmod(minutes, 60)
    strings = []
    if hours > 0:
        strings.append('{} hours'.format(hours))
    if rminutes > 0:
        strings.append('{} minutes'.format(rminutes))
    if rseconds > 0:
        strings.append('{} seconds'.format(rseconds))
    return ', '.join(strings)
