Snow Cones

No attempts yetTime limit1sMemory limit128 MB

Problem

Children stand in a line, and each child is handed a snow cone in one of two flavors. Because the cones got mixed up while being handed out, a child may not receive the flavor they requested. The number of cones of each flavor that were handed out exactly matches the number requested, so the children can trade among themselves until everyone holds the flavor they want.

During one time step, neighboring children in the line may trade cones. Several trades may happen at the same time, but each child may take part in at most one trade per time step. Determine the minimum number of time steps needed until every child holds the flavor they requested.

Input

The first line contains the number $K$ of data sets. Each of the following $K$ data sets consists of two lines.

  • The first line is a string of $N$ characters ($1 \le N \le 1000$) listing, in line order, the flavor each child was handed.
  • The second line is a string of the same $N$ characters listing the flavor each child requested, possibly in a different order.

Each flavor is one of the two uppercase letters X and O. For every data set, the count of each flavor on the first line equals its count on the second line.

Output

For each data set, print Data Set x: on its own line, where $x$ is the data set's number starting from $1$. On the next line, print the minimum number of time steps required until every child holds the flavor they requested. Separate consecutive data sets with a blank line.