class AdmissionAgent:
    def reply(self):
        return (
            "🎓 Admission Agent\n"
            "Admission Process:\n"
            "1. Fill the online application form.\n"
            "2. Upload required documents.\n"
            "3. Pay the registration fee.\n"
            "4. Wait for admission confirmation."
        )


class ExamAgent:
    def reply(self):
        return (
            "📝 Exam Agent\n"
            "Exam Information:\n"
            "1. Mid Semester Exam\n"
            "2. End Semester Exam\n"
            "3. Practical Examination\n"
            "4. Results will be declared on the portal."
        )


class FeesAgent:
    def reply(self):
        return (
            "💰 Fees Agent\n"
            "Fee Details:\n"
            "1. Tuition Fee\n"
            "2. Hostel Fee\n"
            "3. Library Fee\n"
            "4. Fees can be paid online or offline."
        )


class ScholarshipAgent:
    def reply(self):
        return (
            "🏆 Scholarship Agent\n"
            "Scholarship Information:\n"
            "1. Merit Scholarship\n"
            "2. Government Scholarship\n"
            "3. Sports Scholarship\n"
            "4. Apply before the last date."
        )


class ResponseAgent:
    def respond(self, message):
        print("\n--------------------------------")
        print(message)
        print("--------------------------------\n")


class IntentClassifier:
    def classify(self, text):
        text = text.lower()

        if any(word in text for word in ["admission", "apply", "college", "document"]):
            return "admission"

        elif any(word in text for word in ["exam", "test", "result", "marks"]):
            return "exam"

        elif any(word in text for word in ["fee", "fees", "payment", "money"]):
            return "fees"

        elif any(word in text for word in ["scholarship", "financial aid", "grant"]):
            return "scholarship"

        else:
            return "unknown"


admission = AdmissionAgent()
exam = ExamAgent()
fees = FeesAgent()
scholarship = ScholarshipAgent()
classifier = IntentClassifier()
response = ResponseAgent()

print("========================================")
print(" College Information Multi-Agent System ")
print("========================================")

while True:
    user = input("\nYou: ")

    if user.lower() in ["exit", "quit", "bye"]:
        print("\nBot: Thank you for using the system. Goodbye!")
        break

    elif user.lower() in ["hi", "hello", "hey", "hii", "good morning", "good evening"]:
        response.respond(
            "👋 Hello! Welcome to the College Information System.\n"
            "You can ask me about:\n"
            "- Admission\n"
            "- Exams\n"
            "- Fees\n"
            "- Scholarships\n"
            "Type 'exit' to quit."
        )
        continue

    intent = classifier.classify(user)

    if intent == "admission":
        response.respond(admission.reply())

    elif intent == "exam":
        response.respond(exam.reply())

    elif intent == "fees":
        response.respond(fees.reply())

    elif intent == "scholarship":
        response.respond(scholarship.reply())

    else:
        response.respond(
            "❌ Sorry, I couldn't understand your request.\n"
            "Please ask about Admission, Exams, Fees, or Scholarships."
        )