Routing of spark plug wires on 2001 Hyundai XG300

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
Changing plugs and wires on 2001 Hyundai XG300 my grandson bought. Not sure wires were connected properly when he purchased the car. Did not run worth a darn.
What is the cylinder layout? Which coil does each wire from rear cylinders connect to?
(1) Answer
I don't have a diagram on your engine but if it's like the 2.5L or 2.7L engines it 1-3-5 on the rear bank and 2-4-6 on the front. The firing order for those is 1,2,3,4,5,6. The ign coil pack, from front to back goes 1,4,5,2,3,6 for those motors. Yours may be the same.
You could check on some online manuals for the info that you need or you could tow it to a Hyundai or Mitsubishi specialist.
Here are two data sources for you:
For AllData:
Here's the one for Mitchell as well:

If you want to find a specialist, here's a directory link for you: