410447: GYM104022 E Isomerism

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Isomerismtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output

In chemistry, isomerism is the phenomenon in which more than one compounds have the same chemical formula but different chemical structures. Chemical compounds that have identical chemical formulae but differ in properties and the arrangement of atoms in the molecule are called isomers.

Ethylene, which has a carbon-carbon double bond, is one of the most important fundamental chemicals in the petrochemical industry as it is the source material for a variety of products such as polyethene resin, ethylene glycol, vinyl chloride resin, acetic acid, styrene, and alpha-olefin which are produced by polymerization, oxidation, alkylation, hydration, or the addition of halogen. The precise format of an ethylene derivative is given in the figure below, where $$$R_1, R_2, R_3, R_4$$$ are atoms or atomic groups. We always suppose that $$$R_1$$$ and $$$R_2$$$ are on the same side of the carbon-carbon double bond, while $$$R_3$$$ and $$$R_4$$$ are on the other side. The carbon-carbon double bond in an ethylene derivative cannot rotate around the bond axis.

To distinguish isomers of the ethylene derivatives, two different naming methods, say Cis-Trans isomerism and Zasammen-Entgegen isomerism, are invented in the academic circle. The different scopes of application between these two methods are listed as follows:

  • If a carbon atom connects with two identical atoms or atomic groups, isomerism of the given ethylene derivative does not exist; otherwise
  • if some atoms or atomic groups connecting with carbon atoms are the same, the ethylene derivative is called Cis-Trans isomerism. If the two identical atoms or atomic groups lie on the same side (i.e. upside or downside in the figure above) of the carbon-carbon double bond, it is called Cis-isomerism, or else it is called Trans-isomerism;
  • if the four atoms or atomic groups connecting with carbon atoms are pairwise distinct, the ethylene derivative is called Zasammen-Entgegen isomerism. If the atom or the atomic group of $$$R_1$$$ and $$$R_3$$$ with a higher priority and the atom or the atomic group of $$$R_2$$$ and $$$R_4$$$ with a higher priority lie on the same side (i.e. upside or downside in the figure above) of the carbon-carbon double bond, it is called Zasamman-isomerism, or else it is called Entgegen-isomerism.

All the atoms or atomic groups which may appear in $$$R_1$$$, $$$R_2$$$, $$$R_3$$$ and $$$R_4$$$ are listed as follows in descending order of the priority, the first of which is the one with the highest priority.

  • -F, -Cl, -Br, -I, -CH3, -CH2CH3, -CH2CH2CH3, -H

Now, you are asked to determine if there is any isomerism for a given ethylene derivative and find out the naming method it fits for when possible.

Input

The first line contains an integer $$$T$$$ $$$(1 \le T \le 10^5)$$$, indicating the number of test cases.

Then follow $$$T$$$ test cases. For each test case:

The only line contains four strings $$$R_1$$$, $$$R_2$$$, $$$R_3$$$ and $$$R_4$$$ $$$(R_1, R_2, R_3, R_4 \in \{$$$-F, -Cl, -Br, -I, -CH3, -CH2CH3, -CH2CH2CH3, -H$$$\})$$$, which are the atoms or atomic groups connecting to carbon atoms of the ethylene derivative.

Output

For each test case, output a string in one line, describing the type of isomerism the ethylene derivative fits for as follows:

  • If there is no isomerism of this ethylene derivative, output "None";
  • If it is Cis-isomerism, output "Cis";
  • If it is Trans-isomerism, output "Trans";
  • If it is Zasamman-isomerism, output "Zasamman";
  • Otherwise, it should be Entgegen-isomerism, so output "Entgegen".
ExampleInput
2
-H -H -H -Cl
-F -F -Br -Cl
Output
None
Cis

加入题单

算法标签: