import re


def parse_relaxation(relaxation):
    """
    Helper function to verify if time format is as expected and to split it.
    :param relaxation: string representing the grace period
    :return: tuple consisting of integers representing the hour, minute and second
    """
    assert re.match(r"[0-9][0-9]:[0-9][0-9]:[0-9][0-9]", relaxation), 'Relaxation is expected in a form HH:MM:SS, ' \
                                                                      'but {} was provided'.format(relaxation)

    split = relaxation.split(':')
    return int(split[0]), int(split[1]), int(split[2])