1407: Year of the Cow

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:10 Solved:6

Description

Input

Output

输出 Bessie 和 Elsie 的出生年份之间相差的年数。输入保证可以通过给定的信息求出结果。


Elsie 在 Bessie 之前 12 年出生。

Mildred 在 Bessie 之前 9 年出生。

Gretta 在 Bessie 之前 17 年出生。

Paulina 在 Bessie 之前 9 年出生。


Sample Input Copy

4
Mildred born in previous Dragon year from Bessie
Gretta born in previous Monkey year from Mildred
Elsie born in next Ox year from Gretta
Paulina born in next Dog year from Bessie

Sample Output Copy

12