There are n left boots and n right boots. Each boot has a color which is denoted as a lowercase Latin letter or a question mark ('?'). Thus, you are given two strings l and r, both of length n. The character l_i stands for the color of the i-th left boot and the character r_i stands for the color of the i-th right boot.

A lowercase Latin letter denotes a specific color, but the question mark ('?') denotes an indefinite color. Two specific colors are compatible if they are exactly the same. An indefinite color is compatible with any (specific or indefinite) color.

For example, the following pairs of colors are compatible: ('f', 'f'), ('?', 'z'), ('a', '?') and ('?', '?'). The following pairs of colors are not compatible: ('f', 'g') and ('a', 'z').

Compute the maximum number of pairs of boots such that there is one left and one right boot in a pair and their colors are compatible.

Print the maximum number of such pairs and the pairs themselves. A boot can be part of at most one pair.

Input

The first line contains n (1 ≤ n ≤ 150000), denoting the number of boots for each leg (i.e. the number of left boots and the number of right boots).

The second line contains the string l of length n. It contains only lowercase Latin letters or question marks. The i-th character stands for the color of the i-th left boot.

The third line contains the string r of length n. It contains only lowercase Latin letters or question marks. The i-th character stands for the color of the i-th right boot.

Output

Print k — the maximum number of compatible left-right pairs of boots, i.e. pairs consisting of one left and one right boot which have compatible colors.

The following k lines should contain pairs a_j, b_j (1 ≤ a_j, b_j ≤ n). The j-th of these lines should contain the index a_j of the left boot in the j-th pair and index b_j of the right boot in the j-th pair. All the numbers a_j should be distinct (unique), all the numbers b_j should be distinct (unique).

If there are many optimal answers, print any of them.

Examples

Input


10
codeforces
dodivthree


Output


5
7 8
4 9
2 2
9 10
3 1


Input


7
abaca?b
zabbbcc


Output


5
6 5
2 3
4 6
7 4
1 2


Input


9
bambarbia
hellocode


Output


0


Input


10
code??????
??????test


Output


10
6 2
1 6
7 3
3 5
4 8
9 7
5 1
2 4
10 9
8 10
    import java.util.*;
    import java.io.*;

    public class Main {

	static FastScanner scn = new FastScanner();
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] HastaLaVistaLa) {
		// Running Number Of TestCases (t)
		int t = 1;
		while(t-- > 0)
			solve();
		out.close();
	}

	static long MOD = 998244353L;
	static long[][] dp;
	static long ans;
	static boolean[][] vis;
	public static void solve() {
		// What's up Code Forces
		int n = scn.nextInt();
		char[] l = scn.next().toCharArray();
		char[] r = scn.next().toCharArray();
		int[] freqL = new int[27], freqR = new int[27];
		for(char c : l) if(c == '?') freqL[26]++; else freqL[c - 'a']++;
		for(char c : r) if(c == '?') freqR[26]++; else freqR[c - 'a']++;

		List<Integer> x = new ArrayList<>(), y = new ArrayList<>();

		HashMap<Integer, List<Integer>> indexL = indexes(l, n);
		HashMap<Integer, List<Integer>> indexR = indexes(r, n);

		List<Integer> indLq = new ArrayList<>();
		List<Integer> indRq = new ArrayList<>();
		for(int i = 0; i < n; i++) {
			if(l[i] == '?') indLq.add(i);
			if(r[i] == '?') indRq.add(i);
		}
		
		boolean[][] vis = new boolean[n][2]; // Initially Everything is False (This is Life Mannnnn)

		outer : for(int i = 0; i < 26; i++) {
			int a = freqL[i];
			while(freqR[i] > 0 && a > 0) {
				List<Integer> indR = indexR.get(i);
				List<Integer> indL = indexL.get(i);
				int sizeR = indR.size(), sizeL = indL.size();
				if(sizeL > 0 && sizeR > 0) {
					x.add((indL.get(sizeL - 1) + 1));
					y.add((indR.get(sizeR - 1) + 1));
					vis[indL.get(sizeL - 1)][0] = true;
					vis[indR.get(sizeR - 1)][1] = true;
					freqR[i]--;
					indL.remove(sizeL - 1);
					indR.remove(sizeR - 1);
					freqL[i]--;
				}else continue outer;
			} 
		}

		outer : for(int i = 0; i < 26; i++) {
			int a = freqR[i];
			while(freqL[i] > 0 && a > 0) {
				List<Integer> indR = indexR.get(i);
				List<Integer> indL = indexL.get(i);
				int sizeR = indR.size(), sizeL = indL.size();
				if(sizeL > 0 && sizeR > 0) {
					x.add((indL.get(sizeL - 1) + 1));
					y.add((indR.get(sizeR - 1) + 1));
					vis[indL.get(sizeL - 1)][0] = true;
					vis[indR.get(sizeR - 1)][1] = true;
					indL.remove(sizeL - 1);
					indR.remove(sizeR - 1);
					freqL[i]--;
					freqR[i]--;
				}else continue outer;
			} 
		}
		int sizeR = indRq.size();
		int sizeL = indLq.size();
		// Without Question marks here
		for(int i = 0; i < n; i++) {
			if(!vis[i][0] && sizeR > 0 && l[i] != '?') {
				// The element left at l, So use marks of r (?)

				sizeR--;
				x.add(i+1);
				y.add((indRq.get(sizeR)) + 1);
				vis[i][0] = true;
				vis[indRq.get(sizeR)][1] = true;
			}
		}

		for(int i = 0; i < n; i++) {
			if(!vis[i][1] && sizeL > 0 && r[i] != '?') {
				// The element left at r, So use marks of l (?)
				sizeL--;
				x.add((indLq.get(sizeL)) + 1);
				y.add(i+1);
				vis[i][1] = true;
				vis[indLq.get(sizeL)][0] = true;
			}
		}
		// With Question Marks Here

		for(int i = 0; i < n; i++) {
			if(!vis[i][0] && sizeR > 0) {
				// The element left at l, So use marks of r (?)
				sizeR--;
				x.add(i+1);
				y.add((indRq.get(sizeR)) + 1);
				vis[i][0] = true;
				vis[indRq.get(sizeR)][1] = true;
			}
		}

		for(int i = 0; i < n; i++) {
			if(!vis[i][1] && sizeL > 0) {
				// The element left at r, So use marks of l (?)
				sizeL--;
				x.add((indLq.get(sizeL)) + 1);
				y.add(i+1);
				vis[i][1] = true;
				vis[indLq.get(sizeL)][0] = true;
			}
		}
		int ans = x.size();
		out.println(ans);
		for(int i = 0; i < ans; i++) {
			out.println(x.get(i) + " " + y.get(i));
		}
			
	} 

	public static HashMap<Integer, List<Integer>> indexes(char[] ch, int n) {

		HashMap<Integer, List<Integer>> map = new HashMap<>();
		for(int i = 0; i < n; i++) {
			int c = ch[i] - 'a';
			if(map.containsKey(c)) {
				List<Integer> temp = map.get(c);
				temp.add(i);
				map.put(c, temp);
			}else {	
				List<Integer> list = new ArrayList<>();
				list.add(i);
				map.put(c, list);
			}
		}
		return map;
	}

	public static boolean isPrime(int p) {
		int l = (int) Math.sqrt(p);
		for(int i = 2; i <= l; i++) {
			if(p % i == 0) return false;
		}
		return true;
	}
 
	public static long binpow(long n, long m, long mod) {
	        long res = 1;
	        while (m > 0) {
	            if (m % 2 == 1) {
	                res *= n;
	                res %= mod;
	                m--;
	            }
	            n *= n;
	            n %= mod;
	            m /= 2;
	        }
	        return res;
    	}

    	// To calculate the Factorial in Combinatorics Problems
	static long[] fact;
    	public static void factorial(int n) {
    		fact = new long[n];
		Arrays.fill(fact, 1);
		for(int i = 1; i < n; i++) fact[i] *= ( ((long) i * (fact[i-1])) % MOD);
    	}

	public static HashMap<Character, Integer> CountCharFrequencies(char[] arr) {
		HashMap<Character, Integer> map = new HashMap<>();
		for (char i : arr) if (map.containsKey(i)) map.put(i, map.get(i) + 1); else map.put(i, 1);
		return map;
	}

	public static HashMap<Integer, Integer> CountIntFrequencies(int[] arr) {
		HashMap<Integer, Integer> map = new HashMap<>();
		for (int i : arr) if (map.containsKey(i)) map.put(i, map.get(i) + 1); else map.put(i, 1);
		return map;
	}

	// Number of Divisor for Range [l, r]
	public static int[] NumberOFDivisors(int l, int r) {
		int[] arr = new int[l - r + 1];
		for(int i = l; i <= r; i++) for(int j = i; j <= r; j += i) arr[j]++;
		return arr;
	}

	public static int LowerBound(int a[], int x) { // x is the target value or key

		  int l = -1,r = a.length;
		  while(l + 1 < r) {
		    int m = (l + r) >>> 1;
		    if(a[m] >= x) r = m;
		    else l = m;

		  }
		  return r;
	}

	static boolean[] prime;
	public static void sieveOfEratosthenes(int n) {

        	prime = new boolean[n+1];
	        for(int i=0;i<n;i++)
	            prime[i] = true;
	        for(int p = 2; p*p <=n; p++) {
	            if(prime[p] == true) {
	                for(int i = p*p; i <= n; i += p)
	                    prime[i] = false;
	            }
	        }
    	}

	public static int UpperBound(int[] a, int x) {// x is the key or target value

		    int l = -1,r = a.length;
		    while(l + 1 < r) {
		       int m = (l + r) >>> 1;
		       if(a[m] <= x) l = m;
		       else r = m;
		    }
		    return l + 1;
	}

    	public static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	public static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	public static void sort(int[] arr) {
		Random rand = new Random();
		int n = arr.length;
		for(int i = 0; i<n; i++) {
			swap(arr, i, rand.nextInt(n));
		}
		Arrays.sort(arr);
	}

	public static void swap(int[] arr, int i, int j) {
		if(i!=j) {
			arr[i] ^= arr[j];
			arr[j] ^= arr[i];
			arr[i] ^= arr[j];
		}
	}
     
	public static void sortbyColumn(int[][] arr, int col) {
		Arrays.sort(arr, new Comparator<int[]>() {
			public int compare(final int[] entry1, final int[] entry2) {
				if (entry1[col] > entry2[col])
					return 1;
				else
					return -1;
			}
		});
	}

	public static void ArraySort2D(double[][] arr, int xy) {
		// xy == 0, for sorting wrt X-Axis
		// xy == 1, for sorting wrt Y-Axis
		Arrays.sort(arr, Comparator.comparingDouble(o -> o[xy]));
	}
     
	public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readIntArray(int n) {
        	int[] a = new int[n];
        	for(int i = 0; i < n; i++) a[i] = scn.nextInt();
        	return a;
        }
        long[] readLongArray(int n) {
        	long[] a = new long[n];
        	for(int i = 0; i < n; i++) a[i] = scn.nextLong();
        	return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}