#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function
from sys import stdin
from collections import defaultdict

def solveCase(caseNumber):
    res = "NO"
    n = int(stdin.readline())
    C = map(int, stdin.readline().split())
    xor = 0
    for c in C:
        xor ^= c
    if xor == 0:
        res = sum(C)-min(C)
    print("Case #{0}: {1}".format(caseNumber, res))

if __name__ == "__main__":
    t = int(stdin.readline())
    for i in range(t):
        solveCase(i+1)

f9c2fffed20befdbd3566eafe37129fd6ed58100
<mask token>

<mask token>


def solveCase(caseNumber):
    res = 'NO'
    n = int(stdin.readline())
    C = map(int, stdin.readline().split())
    xor = 0
    for c in C:
        xor ^= c
    if xor == 0:
        res = sum(C) - min(C)
    print('Case #{0}: {1}'.format(caseNumber, res))


<mask token>

<mask token>


def solveCase(caseNumber):
    res = 'NO'
    n = int(stdin.readline())
    C = map(int, stdin.readline().split())
    xor = 0
    for c in C:
        xor ^= c
    if xor == 0:
        res = sum(C) - min(C)
    print('Case #{0}: {1}'.format(caseNumber, res))


if __name__ == '__main__':
    t = int(stdin.readline())
    for i in range(t):
        solveCase(i + 1)

from __future__ import print_function
from sys import stdin
from collections import defaultdict


def solveCase(caseNumber):
    res = 'NO'
    n = int(stdin.readline())
    C = map(int, stdin.readline().split())
    xor = 0
    for c in C:
        xor ^= c
    if xor == 0:
        res = sum(C) - min(C)
    print('Case #{0}: {1}'.format(caseNumber, res))


if __name__ == '__main__':
    t = int(stdin.readline())
    for i in range(t):
        solveCase(i + 1)

#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function
from sys import stdin
from collections import defaultdict

def solveCase(caseNumber):
    res = "NO"
    n = int(stdin.readline())
    C = map(int, stdin.readline().split())
    xor = 0
    for c in C:
        xor ^= c
    if xor == 0:
        res = sum(C)-min(C)
    print("Case #{0}: {1}".format(caseNumber, res))

if __name__ == "__main__":
    t = int(stdin.readline())
    for i in range(t):
        solveCase(i+1)
