#K41612. Employee Record Lookup
Employee Record Lookup
Employee Record Lookup
You are given a list of employee records, where each record consists of an employee's ID, name, and department. Your task is to write a program that reads the employee records from the standard input, and then finds and outputs the record for a given employee ID.
If the employee is found, output the employee's Name and Department separated by a space. Otherwise, output the string "Employee not found".
The problem can be mathematically interpreted as follows: Given an integer $T$ representing the number of employees, and a target ID $Q$, let $R = \{(id, name, dept)\}$ be the set of records. Find $(name, dept)$ such that $id = Q$, if it exists. If not, report that the employee is not found.
inputFormat
The first line contains a single integer $T$, the number of employee records.
The next $T$ lines each contain an integer and two strings separated by spaces: ID Name Department
.
The last line contains a single integer $Q$, the employee ID to search for.
outputFormat
If an employee with ID $Q$ exists, output a single line with the employee's Name
and Department
separated by a space.
If the employee does not exist, output "Employee not found".
## sample3
1 Alice HR
2 Bob IT
3 Charlie Marketing
2
Bob IT