EIU ACM Preparation

#### Start

2018-05-31 09:30 UTC

## EIU ACM Preparation

#### End

2018-06-01 15:30 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -410 days 20:42:45

30:00:00

0:00:00

# Problem AMetaprogramming

EIGER is a brand-new, made-up computer language. It’s very exciting, and very simple! EIGER only allows the programmer to do two things: define a name for an integer, and compare two names. Write a metaprogram – a program which can simulate the EIGER language.

## Input

Input consists of one command per line, up to $10\, 000$ commands, ending at end of file. A definition command has the form define i x, where i is an integer in the range $[-10\, 000, 10\, 000]$ 1and x is a string of up to $20$ lowercase alphabet characters (a–z). A comparison command has the form eval x y z, where x and z are strings of the same format as in definitions, and y is one of $<$, $>$, or $=$.

## Output

For each definition, use the string as a label for the given integer, but don’t output anything. Redefinitions are allowed. For each comparison, state whether it is true or false, depending on the current definitions. If the result is not known, output ‘undefined’.

Sample Input 1 Sample Output 1
define 5 hellothere
define 6 goodbye
eval hellothere < goodbye
eval hellothere > goodbye
eval hellothere = goodbye
eval hellothere = hi
define 5 hi
eval hellothere = hi
define 6 hi
eval hellothere = hi

true
false
false
undefined
true
false