In a certain code language, the numbers/symbols are coded using letters as per the table given below and as per the given conditions.
| Number/ Symbol | S | 5 | % | 6 | ^ | 7 | 4 | & | 8 | * | 9 | 1 | ! | 2 | @ | 3 | # |
| Code | A | S | D | F | G | H | J | K | L | M | N | B | V | C | X | Z | Q |
Conditions:
I. If the first element is an even number and the last is an odd number, the codes for the first and last elements are to be interchanged.
II. If both the second and third elements are even numbers, the code for these two will be X.
III. If the first element is a number and the last a symbol, the last element code is to be used for the first element also.
Question:
What will be the code for 8H7$9@ ?