Keyboard
题号:NC252842
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Colin enjoys chatting with Eva online, but he felt that typing with a traditional keyboard was too tiring, so he bought a new keyboard, as shown in the figure below, leaving only the two keys he really needed: Copy and Paste.

Assuming a string S is displayed on the current screen, then (Note that this is different from a regular keyboard) :
  • If you press Copy, then the current string S will be copied entirely into memory and stored as another string called T .
  • If you press Paste, then the system will concatenate the string T after S, which means the string displayed on the screen will become S+T (string connection) . If no Copy has been executed before, then T is an empty string.
Although the keyboard is already simple enough, Colin still finds it too tiring to think about how to use these two keys. So he decide to use them in turn: At first, press Copy, then Paste, then Copy, then Paste, taking turns until the string displayed on the screen is the one he wants.

Assuming that there is now a string S_1 on the screen, and no operation has been executed before (T is an empty string), can Colin obtain the string S_2 he wants through the above operations?

输入描述:

The first line contains a string S_1\ ( 1 \le |S_1| \le 10^5) consisting of lowercase letters, representing the current string displayed on the screen.
The second line contains a string S_2 \text{ } (1 \le |S_2| \le 10^5 ) consisting of lowercase letters, representing the string Colin wants to get.

输出描述:

If Colin could obtain the string he wants, output "Smart People's Big Win!" (without quotes) .
Otherwise output "Lazy Dog's Great Failure..." (without quotes) .
示例1

输入

复制
colin
colinloveseva

输出

复制
Lazy Dog's Great Failure...
示例2

输入

复制
heihei
heiheiheihei

输出

复制
Smart People's Big Win!