ABC

Time limit1sMemory limit128 MB

Problem

Three distinct natural numbers are named A, B, and C after sorting them so that A < B < C. The input gives these three values in arbitrary order.

Print the values of A, B, and C in the order requested by the three-letter string on the second line.

Input

The first line contains three natural numbers, each at most 100, separated by spaces. The numbers are distinct; after sorting them in increasing order, they are A, B, and C.

The second line contains a string of length 3 made from the letters A, B, and C.

Output

Print the values corresponding to the letters in the string, separated by single spaces, on one line.