solve the problem of type