#include <cstring>
#include <iostream>
using namespace std;

const short maxSize = 46;

int main() {
	int n, matchingLetters;
	cin >> n;
	cin.ignore();
	char *word_1 = new char[maxSize]; 
	char *word_2 = new char[maxSize];
	for (int i = 0; i < n; i++) {
		 matchingLetters = 0;
		 cin.getline(word_1, maxSize);
		 cin.getline(word_2, maxSize);
		 for (int j = 0; j < strlen(word_1); j++) {
		 	  if (strchr(word_2, word_1[j])) {
		 	  	   *strchr(word_2, word_1[j]) = '#';
		 	  	   matchingLetters++;
		 	  }
		 }
		 cout << "Case #" << i + 1 << ":  " << strlen(word_1) + strlen(word_2) - 2 * matchingLetters << endl;
	}
	return 0;
}