Is Yeongwoo a cheater?

Given building dependencies and a log of build and destroy events, decide whether every event is legal without the cheat key.

Medium4SimulationGraphImplementationNo attempts yetTime limit1sMemory limit512 MB

Problem

Yeongseon and Yeongwoo recently started playing a game called Space War. It is a one on one real time strategy game where each player constructs buildings and trains units from them. The game fixes the order in which buildings go up. Suppose the buildings are related as in the picture below.

Buildings 2 and 3 can go up only while building 1 stands, and building 4 can go up only while buildings 2 and 3 both stand. Building 4 has no direct link to building 1, so building 4 can go up even with building 1 gone, as long as buildings 2 and 3 are there. Here building 1 influences buildings 2 and 3, and buildings 2 and 3 influence building 4. A player may own several copies of the same building. The developer, Ice Storm, limited each building to influencing at most 3 buildings to keep the game balanced.

To construct a building, every building that influences it must stand in at least one copy at that moment. Once a building is destroyed and its count drops to 0, the buildings it influences cannot go up until it stands again.

The game has one cheat key that places any building right away, ignoring the order. Winning with it is far too easy, so Yeongseon and Yeongwoo agreed never to use it. Yeongwoo still won every match, and Yeongseon got suspicious and obtained Yeongwoo's construction and destruction log. A building placed with the cheat key leaves no record in the log. Help Yeongseon by writing a program that reads the log and decides whether Yeongwoo used the cheat key.

Input

The program reads from standard input. The first line has the number of building types N, the number of relations M, and the number of records K. (1 ≤ N, M, K ≤ 100,000)

Each of the next M lines has one relation X Y, meaning X must stand before Y can go up. (1 ≤ X, Y ≤ N) No relation is given twice, and each building influences at most 3 buildings.

Each of the next K lines has one record of Yeongwoo's game, in chronological order. (1 ≤ a ≤ N)

  • 1 a: Yeongwoo constructed one copy of building a.
  • 2 a: one copy of Yeongwoo's building a was destroyed.

Output

The program writes to standard output. If every record is possible, meaning each construction respected the order and each destruction removed a building that was standing, print King-God-Emperor on the first line. If any record constructs a building that cannot go up yet, or destroys a building Yeongwoo does not have, print Lier!. Print either string exactly as written.