Text between # characters will have all embedded numbers (there will never be more than 6 digits in a number) converted to hexadecimal
eg: #Text with 31 12 and 64# becomes Text with 1F C and 40

Text between < characters should be reversed
eg: This <be reversed<odd becomes This desrever ebodd

Text between @ characters should be copied verbatim – ie: markup is ignored. Note that this means that there is no way of getting @ characters into the output.
eg: This is @\<<#@ verbatim becomes This is \<<# verbatim

Markleft sections may be nested, but if so must be nested properly (like matching brackets).

^aa<bcd<ee^ becomes AADCBEE

The following is illegal because the nesting is improper.

One #reverse me ^uppercase me # and more^

Markleft sections are closed by the first validly nested markleft character. There is no nesting in this example

abc^def^ghi^jkl^mno becomes abcDEFghiJKLmno

But nested marklefts of the same kind are possible sometimes. Usually they have little effect, but:

ab<cd^ef<gh<ij^kl<mn becomes ablkJIGHFEdcmn

The markleft application processes innermost nested sections first

<#31#< becomes F1

입력

Input consists of a number of lines of “marked left” text to be formatted. Lines of input are no longer than 100 characters. Each line should be formatted independently. You may assume that lines have valid markup. The end of input is signalled by a line with just a # character.