#include <bits/stdc++.h>
using namespace std;
int move(vector<int> v, int i) {
if (i == v.size()) {
return 0;
}
return v[i] + move(v, i + 1);
}
int main() {
int t;
cin >> t;
for (int i = 1; i <= t; ++i) {
int n;
cin >> n;
vector<int> v(n);
for (int j = 0; j < n; ++j) {
cin >> v[j];
}
int result = move(v, 0);
cout << "Case " << i << ": " << result << "\n";
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbW92ZSh2ZWN0b3I8aW50PiB2LCBpbnQgaSkgewogIGlmIChpID09IHYuc2l6ZSgpKSB7CiAgICByZXR1cm4gMDsKICB9CiAgcmV0dXJuIHZbaV0gKyBtb3ZlKHYsIGkgKyAxKTsKfQoKaW50IG1haW4oKSB7CiAgaW50IHQ7CiAgY2luID4+IHQ7CiAgZm9yIChpbnQgaSA9IDE7IGkgPD0gdDsgKytpKSB7CiAgICBpbnQgbjsKICAgIGNpbiA+PiBuOwogICAgdmVjdG9yPGludD4gdihuKTsKICAgIGZvciAoaW50IGogPSAwOyBqIDwgbjsgKytqKSB7CiAgICAgIGNpbiA+PiB2W2pdOwogICAgfQogICAgaW50IHJlc3VsdCA9IG1vdmUodiwgMCk7CiAgICBjb3V0IDw8ICJDYXNlICIgPDwgaSA8PCAiOiAiIDw8IHJlc3VsdCA8PCAiXG4iOwogIH0KICByZXR1cm4gMDsKfQ==