def shrink_to_hint(s: str):
    """
    Shrink a string to hint.

    :param str s: Source string
    :return: str
    """
    length = len(s)
    if length < 4:
        return '*' * length

    return '{}**{}'.format(s[0], s[length - 1])