Taxi
Our people don't take a taxi to the subway!
After a lengthy meeting, the company's director decided to arrange taxis to take employees home. He ordered N taxis, exactly matching the number of employees. However, upon arrival, it was discovered that each taxi driver charges a different rate per 1 kilometer.
The director is aware of the distance each employee needs to travel from work to home (unfortunately, all employees live in different directions, so no two employees can share a taxi). The director's goal is to assign each employee to a taxi in a way that minimizes the total taxi expenses, which the company will cover.
Input
The input begins with a natural number N (1 ≤ N ≤ 1000), representing the number of employees, which is also the number of taxis ordered. Following this, N numbers are provided, indicating the distances in kilometers from work to each employee's home (the first number corresponds to the first employee, the second to the second, and so on). All distances are positive integers not exceeding 1000. Next, another N numbers are given, representing the rates per kilometer for each taxi (the first number for the first taxi, the second for the second, and so on). These rates are positive integers not exceeding 10000.
Output
Output N numbers. The first number should indicate the taxi number assigned to the first employee, the second number for the second employee, and so forth, ensuring that the total taxi expenses are minimized. If there are multiple ways to achieve the minimal expenses, you may output any one of them.