|All-time Popular Problems|
|Construct Tree from Inorder & Preorder|
|Sum of two large numbers|
|Level order traversal in spiral form|
|Spirally traversing a matrix|
|Angle between hour and minute hand|
|Binary Tree to DLL|
|Smallest Positive missing number|
|Height of Binary Tree|
|Largest Number formed from an Array|
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.
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.
For each test case in a new line print without quotes "CHANGE" if there is any clash in the menu, else print "BEHAPPY".
1 ≤ T ≤ 100
Length of each indiviual string ≤ 15
cake pastry fish candy meat
burger ham fish cake sauce
pizza chicken cake chilli candy
choco coco cabbage panner cheese