Chocolate

Leju, Rony and Sujon are cousins and have collected L, R & S chocolates respectively. The chocolates come into different types. They have numbered each type by a distinct nonnegative integer of at most five digits. After their chocolate collection, Rony found out something and said, “Why both of you have some types of chocolates that I don’t have?” While Leju and Sujon were looking at each other for answer, Rony realised something more and said, “Oh, no worries! I have some types of chocolates that neither of you have!” Now, you being their older cousin, they have come to you for help. You will have to find out how many types of chocolates each of the boys has while none other have that type. You will also have to find the number of types of chocolates each of the boys does not have while all the others have that type. Input First line of input will contain an integer T (≤ 15), the number of test cases. For each test case, there are three positive integers: L, R, S on the first line (L, R, S ≤ 105). Each of next three lines will contain L, R, S integers; the type of chocolates Leju, Rony & Sujon respectively possesses. Output Begin output of each test case by a line ‘Case #x:’ where x is the case no (starting from 1). Then three lines follow, first one for Leju, second one for Rony and last one for Sujon. Each of these lines will contain 2 integers, separated by a space. First number will denote how many types of chocolates respective boy has but none other have. And, second one will denote how many chocolates both the others have but the respective boy does not. Note: Let’s review the third test case below: Boy All Chocolates possessed by respective boy Chocolates which are pos- sessed by respective boy (while none of other two boys do) Chocolates which are not possessed by respective boy (while both of other two boys do) Leju 11, 22, 33, 44, 55, 66 Rony 11, 22, 77, 88 Sujon 33, 44, 55 Sample Input 3 222 12 34 00 222 12 23 31 66 77, 88 33, 44, 55 11, 22

2/2 643 11 22 33 44 55 66 11 22 77 88 33 44 55 Sample Output Case #1: 20 20 10 Case #2: 01 01 01 Case #3: 10 23 02