407664: GYM102868 B Blue
Description
Blue had a few seconds to stop and do wires in Storage before getting on with the rest of his investigation into the rest of the crew. Blue can complete wires by connecting wires between the wire slots of the same color together. However, it seems like the wire configuration that he has been given is a little more complicated than normal, and he might need additional help to figure out the desired wire pairings.
You will be given two sets of colored wire slots, represented by alphabetic characters (that could be uppercase or lowercase). You are guaranteed that all colored wire slots are distinct and any colored wire slots in the first set will be accompanied by a wire slot with the same color on the second set.
For each colored wire slot in the first set, you must figure out the one-based index of that colored wire slot in the second set so that Blue can connect the two slots. Print out all these one-based indexes together (not separated by anything).
InputThe first line will consist of a single integer $$$n$$$ ($$$1 \leq n \leq 52$$$), which gives the number of wire slots in each set. The next line consists of a string with $$$n$$$ distinct alphabetic characters that represent the first set of colored wire slots. The next line consists of a string with the same $$$n$$$ distinct alphabetic characters that represent the next set of colored wire slots.
OutputPrint out the one-based index of the colored wire slot in the second set for each colored wire slot in the first set, separated by nothing.
ExamplesInput4 RYGB BGRYOutput
3421Input
15 bWLQefvOKuJpxGm vKeQpJfbmLxGWOuOutput
813104371142156511129Note
The first test case gives us the indices $$$[3, 4, 2, 1]$$$. The second test case gives us the indices $$$[8, 13, 10, 4, 3, 7, 1, 14, 2, 15, 6, 5, 11, 12, 9].$$$