Under construction

Still being built. Things may change

Prijateljice

Interview

Time limit1sMemory limit1024 MB

Summary
Two players alternately say larger words from their own sorted lists, starting with the same or next letter. Decide the winner if Leona opens with her smallest word.
Level

Medium5 of 10

Topics
Game theory, Dynamic programming, Sorting
Solved
No attempts yet

Problem

One summer night in Krk, Leona and Zoe went for a walk. On their winding path, they found a pile of words! Excited by that, they quickly started collecting them: Leona collected nn words, and Zoe mm words. After admiring them for a while, they decided to play the following game:

In one move a player says a word from her pile. The player chooses the word so that two conditions hold. The word is lexicographically greater than the previous word, and it begins with the same letter as the previous word or with the letter that follows the first letter of the previous word in the English alphabet. If a player cannot make a move, she loses.

They alternate turns, and Leona plays first by saying her lexicographically smallest word. If Leona and Zoe play optimally, determine who wins.

Note: The word A is lexicographically smaller than the word B if A is a prefix of B, or if at the first position where A and B differ, the letter in A comes before the letter in B.

Input

The first line contains integers nn and mm (1≤n,m≤1051 \le n, m \le 10^5), the number of Leona's words and the number of Zoe's words.

The following nn lines contain Leona's words. The following mm lines contain Zoe's words.

Words contain only lowercase English letters, all words are mutually distinct, their total length is at most 10610^6, and Leona's and Zoe's words are each sorted lexicographically.

Output

Output Leona or Zoe, the name of the winner.

Hint

Clarification of the first example: Leona starts with the word avokado, then Zoe continues with her only word brazil. Leona cannot make any move, so she loses.

Examples3

  1. Example 1

    Input
    2 1
    avokado
    dabar
    brazil
    
    Expected output
    Zoe
    
  2. Example 2

    Input
    3 3
    ananas
    atlas
    banana
    albatros
    cikla
    nogomet
    
    Expected output
    Leona
    
  3. Example 3

    Input
    2 2
    hrvatska
    zastava
    bijeli
    galeb
    
    Expected output
    Leona