Given three strings STR1, STR2, and STR3, re-arrange them so that they can be linked by their first and last characters.
For example, if STR1 is "abc", STR2 is "xya", and STR3 is "cjk", then the output should be "xyabcjk".
If STR1 is "abc", STR2 is "xya", and STR3 is "uvx", then the output should be "uvxyabc".
Each string contains exactly three lowercase letters.
It is guaranteed that there exists exactly one solution.
The input cotains three strings, STR1, STR2, and STR3.
The lenght of each string is exactly 3, and each string comprises only lowercase letters.
The output is the linked string. There is NO newline character at the end of the output.