#abc371a. A - Jiro

A - Jiro

Score : 150150 points

问题陈述

有三个兄弟,分别叫做 ABC。他们之间的年龄关系由三个字符 SABS_{\mathrm{AB}}SACS_{\mathrm{AC}}SBCS_{\mathrm{BC}} 表示,具体含义如下:

  • 如果 SABS_{\mathrm{AB}}<,则表示 AABB 年轻;如果是 >,则表示 AABB 年长。
  • 如果 SACS_{\mathrm{AC}}<,则表示 AACC 年轻;如果是 >,则表示 AACC 年长。
  • 如果 SBCS_{\mathrm{BC}}<,则表示 BBCC 年轻;如果是 >,则表示 BBCC 年长。

谁是中间的兄弟,即他们三个中第二年长的?

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

There are three brothers named A, B, and C. The age relationships among them are given by three characters SAB,SAC,SBCS_{\mathrm{AB}}, S_{\mathrm{AC}}, S_{\mathrm{BC}}, which mean the following:

  • If SABS_{\mathrm{AB}} is <, then AA is younger than BB; if it is >, then AA is older than BB.
  • If SACS_{\mathrm{AC}} is <, then AA is younger than CC; if it is >, then AA is older than CC.
  • If SBCS_{\mathrm{BC}} is <, then BB is younger than CC; if it is >, then BB is older than CC.

Who is the middle brother, that is, the second oldest among the three?

Constraints

  • Each of SAB,SAC,SBCS_{\mathrm{AB}}, S_{\mathrm{AC}}, S_{\mathrm{BC}} is < or >.
  • The input contains no contradictions; that is, there always exists an age relationship that satisfies all given inequalities.

Input

The input is given from Standard Input in the following format:

SABS_{\mathrm{AB}} SACS_{\mathrm{AC}} SBCS_{\mathrm{BC}}

Output

Print the name of the middle brother, that is, the second oldest among the three.

Sample Input 1

< < <

Sample Output 1

B

Since AA is younger than BB, and BB is younger than CC, we can determine that CC is the oldest, BB is the middle, and AA is the youngest. Hence, the answer is B.

Sample Input 2

< < >

Sample Output 2

C