def hgt_valid(passport):
    """ Check that hgt is valid

    hgt (Height) - a number followed by either cm or in:
    If cm, the number must be at least 150 and at most 193.
    If in, the number must be at least 59 and at most 76.

    :param passport: passport
    :return: boolean
    """
    return (passport['hgt'][-2:] == 'cm' and 150 <= int(passport['hgt'][:-2]) <= 193) or \
           (passport['hgt'][-2:] == 'in' and 59 <= int(passport['hgt'][:-2]) <= 76)