BETA
This is a school problem. Successful submissions of this are not counted in user ratings.

Submissions : 397 Accuracy :

39.8

Sort the fest
     

You are the social welfare manager of the fest. Some restaurant owners are also investing in your fest. You are given the menu of the two restaurants. There may be a chance of fight between them if any one of them have any item in common and you surely don't want that to happen. Each of the menu has 5 items (strings) in them. So, your task is to find out if there is any need to change the menu or let them be happy with their respective menu.

Input : 
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains 2 lines.The first line of each test case represents the space separated strings denoting the menu of Restaurant A. The second line of each test case represents the menu of Restaurant B.


Output : 
For each test case in a new line print without quotes "CHANGE" if there is any clash in the menu, else print "BEHAPPY".

Constraints :
1 ≤ T ≤ 100
Length of each indiviual string ≤ 15


Example:
Input : 
2
cake pastry fish candy meat
burger ham fish cake sauce
pizza chicken cake chilli candy
choco coco cabbage panner cheese

Output : 
CHANGE
BEHAPPY

**For More Examples Use Expected Output**


Contributor: Mohit Gupta...OMG :)

Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.