__author__ = 'Aidan'

class Employee:
    pass

class InvalidSocial(ValueError):
    pass

class Employee:
    pass

def validatess(employee_class):
    #check that employee_class.ss is valid
    #Anywhere that you find the ss is invalid raise InvalidSocial
    sep = tuple()
    try:
        a, g, s = employee_class.ss.split("-")
    except ValueError:
        raise InvalidSocial
    try:
        int(a)
        int(g)
        int(s)
    except ValueError:
        raise InvalidSocial
    if len(a) != 3 or len(g) != 2 or len(s) != 4:
        raise InvalidSocial
    elif int(a) == 000 or int(a) == 666 or 900 <= int(a) <= 999 or int(g) == 00 or int(s) == 0000:
        raise InvalidSocial
    sep = (a,g,s)
    if sep == ("078","05","1120"):
        raise InvalidSocial
    return sep

def getsocial(employee_class):
    employee_class.ss = input("Social: ")
    try:
        validatess(employee_class)
    except InvalidSocial:
        print("Invalid SS, please try again\n")
        getsocial(employee_class)

emp = Employee()
getsocial(emp)
print(emp.ss)