import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No0204 { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { int d = in.nextInt(); String s = in.next(); String t = in.next(); s += t; char[] cs = s.toCharArray(); int res = 0; for (int i=0; i<14; i++) { char[] clone = cs.clone(); for (int j=i; j-i