algo4: backtracking: Wildcard matching