ARDH1 - Size Contest Returns !!

Prachi loves Aradhya. But Aradhya is unaware of that.

She is so crazy about him that she decides to give him a surprise on Valentine's day. She tells Aradhya that she loves him by giving him a red rose. Aradhya totally surprised by this behaviour tells Prachi that he has a collection of rings that has I LOVE YOU written on some of them but it's not necessary that the words I LOVE YOU appear one after the other but they should appear in sequence. He asks Prachi to pick up a ring and if it contains I LOVE YOU he will accept her proposal. Since it's a ring you can start reading from anywhere.

Remember the words I LOVE YOU should appear as whole and not be formed by joining two words or should not be a substring of some word. (Thanks Mitch for pointing out the description.)

Best of luck, Prachi Kiss

Input

First Line Contains T (<= 100).

Next T lines contain a string 's'.

|s| <= 1000

Output

For each test case print "I LOVE YOU TOO." if string contains I LOVE YOU else print "HARD LUCK PRACHI.".

Example

Input:
2
I AM IN LOVE WITH YOU
I AM AMERICAN AND DON'T MESS WITH ME

Output:
I LOVE YOU TOO.
HARD LUCK PRACHI.

The less you write the more you gain.


Added by:Aradhya
Date:2014-12-20
Time limit:1s
Source limit:300B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Own Problem

hide comments
2014-12-22 00:46:21 Mitch Schwartz
At the moment, getting the best score seems to be a "guess the input weakness" game. (Aside from guessing the task itself.)

According to my submissions, "LOVE I YOU" should be considered unfavorable. We are apparently supposed to consider the string as circular, and the words "I", "LOVE", and "YOU" need to appear in sequence as such. (But a word may not wrap around from the end of the string to the beginning.)

I'm not sure if any lowercase letters appear in the input -- I got AC by considering just uppercase letters, and also with case insensitivity.

I think words are simply the tokens you get after splitting on whitespace. I didn't do many experiments.

@Aradhya: There are lots of issues to clean up here, if you care enough about your problem to fix them. I'll unhide it and put it in tutorial, since with my comments it should be more or less solvable without the need to guess. It certainly can't be in challenge section in this state, and probably should stay in tutorial even if all of the issues are fixed.

Last edit: 2014-12-22 01:22:04
2014-12-21 15:08:57 Mitch Schwartz
No, rules are still not clear.

You wrote "LOVE I YOU" is favorable, which seems to contradict "they should appear in sequence".

You did not define "word". Is "Don't" considered one word or two words? Can words be separated by any whitespace?

Is "I love you" favorable?
2014-12-21 14:25:26 Francky
Not I, but maybe some others don't LOVE punctuation, what about YOU?
Mitch asked you about what set of char is used! Please update description clearly. This problem possibly belongs to tutorial, and there's yet many issues after publications.
2014-12-21 13:43:57 (Tjandra Satria Gunawan)(曾毅昆)
I think there are error in this problem configuration.
Please set the test case judge to "4. Score is source length" and then click "Update"; and the assesstment type to "minimize score" and then click "Modify".
Finally you should rejudge it by checking the "Refresh cached info about test sequence" checkbox, and click "start rejudge".
-----
Done. Thanks for pointing out.

Last edit: 2014-12-21 13:51:18
2014-12-21 07:07:59 Mitch Schwartz
1) Max number of characters per line should be mentioned.
2) Allowed characters in string should be specified.
3) It's better to make challenge problems harder than this, although this could be tricky to golf if test data is strong.
4) Rules are not fully specified. Do we consider the string as circular because it is written on a ring? So "YOU I LOVE" is favorable while "LOVE I YOU" is not? And what about "ILOVEYOU" or "U I LOVE YO" ? And what about "I LOVELY YOU" ? And what about "I L_O_V_E YOU" ? You need to write clear rules that cover all possibilities.
5) Is the score just source length? Note that SIZECON uses an unusual scoring system, and this problem's title is a reference to that problem.
--------
Reply- LOVE I YOU is favourable whereas ILOVEYOU, U I LOVE YO, I LOVELY YOU etc are not. they should be whole words and not be formed by joining two words and not substring as you are saying in I LOVELY YOU. I hope its clear now , please ping me if something is still wrong.

Last edit: 2014-12-21 07:10:14
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.