def sec_to_m(num):
    """
    >>> sec_to_m(66)
    '01:06'
    """
    template = '%02d:%02d'
    minute = 0
    second = 0
    if num < 59:
        second = num
    elif num > 60:
        minute = num / 60
        second = num % 60
    return template % (minute, second)
