Chef And Binary Operation

All submissions for this problem are available.
Read problems statements in Mandarin Chinese, Russian and Vietnamese as well.
Today is Chef's birthday. His mom decided to surprise him with a truly fantastic gift: his favourite binary string B. But, unfortunately, all the stocks of binary string B have been sold out, and only a binary string A (A ≠ B) is available in the market.
She purchases the string A and tries to convert it to string B by applying any of following three operations zero or more times.
AND Operation:
She will choose a pair of indices i and j such that i != j and perform following sequence of operations.
 result = A_{i} & A_{j}
 A_{i} = result & A_{i}
 A_{j} = result & A_{j}
OR Operation:
She will choose a pair of indices i and j such that i != j and perform following sequence of operations.
 result = A_{i}  A_{j}
 A_{i} = result  A_{i}
 A_{j} = result  A_{j}
XOR Operation:
She will choose a pair of indices i and j such that i != j and perform following sequence of operations.
 result = A_{i} ^ A_{j}
 A_{i} = result ^ A_{i}
 A_{j} = result ^ A_{j}
Chef's mom is eagerly waiting to surprise him with his favourite gift and therefore, she wants to convert string A to string B as fast as possible. Can you please help her by telling her the minimum number of operations she will require? If it is impossible to do so, then let Chef's mom know about it.
Input
First line of input contains a single integer T denoting the number of test cases. T test cases follow.
First line of each test case, will contain binary string A.
Second line of each test case, will contain binary string B.
Output
For each test case, Print "Lucky Chef" (without quotes) in first line and minimum number of operations required to convert string A to sting B in second line if conversion is possible. Print "Unlucky Chef" (without quotes) in a new line otherwise.
Constraints
 1 ≤ T ≤ 10^{5}
 1 ≤ A ≤ 10^{6}
 1 ≤ B ≤ 10^{6}
 A != B
 A = B
 sum of A over all test cases does not exceed 10^{6}
 sum of B over all test cases does not exceed 10^{6}
Subtasks
 Subtask #1 (40 points) : Sum of A & B over all test cases does not exceed 10^{3}
 Subtask #2 (60 points) : Sum of A & B over all test cases does not exceed 10^{6}
Example
Input 2 101 010 1111 1010 Output Lucky Chef 2 Unlucky Chef
Explanation
Example case 1.
 Applying XOR operation with indices i = 1 and j = 2. Resulting string will be 011.
 Then, Applying AND operation with indices i = 1 and j = 3. Resulting string will be 010.
Example case 2.
 It is impossible to convert string A to string B.
Author:  ma5termind 
Tester:  iscsi 
Editorial  http://discuss.codechef.com/problems/BINOP 
Tags  binayops, easy, june16, ma5termind 
Date Added:  5012016 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions