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.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.StringTokenizer;



public class wate {

	public static ArrayList<String> allstring;
	public static ArrayList<Integer> allsum;
	public static void main(String[] args) {
		out=new PrintWriter(new BufferedOutputStream(System.out));
		FastReader s=new FastReader();
		int n=s.nextInt();
		String left=s.next();
		String right=s.next();
		ArrayList<Integer>[] leftdis=new ArrayList[27];
		for(int i=0;i<27;i++) {
			leftdis[i]=new ArrayList<Integer>();
		}
		for(int i=0;i<n;i++) {
			if(left.charAt(i)=='?') {
				leftdis[26].add(i+1);
				continue;
			}
			leftdis[left.charAt(i)-'a'].add(i+1);
		}
		ArrayList<Integer>[] rightdis=new ArrayList[27];
		for(int i=0;i<27;i++) {
			rightdis[i]=new ArrayList<Integer>();
		}
		for(int i=0;i<n;i++) {
			if(right.charAt(i)=='?') {
				rightdis[26].add(i+1);
				continue;
			}
			rightdis[right.charAt(i)-'a'].add(i+1);
		}
		int questions=leftdis[26].size()-rightdis[26].size();
		int count=0;
		ArrayList<Integer> leftside=new ArrayList<Integer>();
		ArrayList<Integer> rightside=new ArrayList<Integer>();
		ArrayList<Integer> remainingright=new ArrayList<Integer>();
		ArrayList<Integer> remainingleft=new ArrayList<Integer>();
		ArrayList<Integer> remainingq=new ArrayList<Integer>();
		for(int i=0;i<26;i++) {
			int min=Integer.min(leftdis[i].size(), rightdis[i].size());
			for(int j=0;j<min;j++) {
				count++;
				leftside.add(leftdis[i].get(j));
				rightside.add(rightdis[i].get(j));
			}
			if( i!=26 && leftdis[i].size()!=min) {
				for(int j=leftdis[i].size()-1;j>=min;j--) {
					remainingleft.add(leftdis[i].get(j));
				}
			}else if(i!=26 &&rightdis[i].size()!=min) {
				for(int j=rightdis[i].size()-1;j>=min;j--) {
					remainingright.add(rightdis[i].get(j));
				}
			}
		}
		int min1=Integer.min(leftdis[26].size(),remainingright.size());
		
		if(leftdis[26].size()>0 && remainingright.size()>0) {
			for(int i=0;i<min1;i++) {
				leftside.add(leftdis[26].get(i));
				rightside.add(remainingright.get(i));
				count++;
			}
		}
		int min2=Integer.min(rightdis[26].size(),remainingleft.size());
		
		if(rightdis[26].size()>0 && remainingleft.size()>0) {
			for(int i=0;i<min2;i++) {
				rightside.add(rightdis[26].get(i));
				leftside.add(remainingleft.get(i));
				count++;
			}
		}
		int k=min1,l=min2;
		while(k<leftdis[26].size() && l<rightdis[26].size()) {
			leftside.add(leftdis[26].get(k));
			rightside.add(rightdis[26].get(l));
			k++;
			l++;
			count++;
		}
		out.println(count);
		for(int i=0;i<leftside.size();i++) {
			out.println(leftside.get(i)+" "+rightside.get(i));
		}
		out.close();
	}
	/*import java.util.*;
import java.io.*;
import java.math.*;

public class A{
    public static void main(String[] args){
        Scanner s=new Scanner(System.in);
        int a=s.nextInt();
        int b=s.nextInt();
        if(b%a!=0){
            System.out.println(-1);
            return;
        }
        int div=b/a;
        int count=0;
        while(div%2==0){
            count++;
            div/=2;
        }
        while(div%3==0){
            count++;
            div/=3;
        }
        if(div!=1){
            System.out.println(-1);
        }else{
            System.out.println(count);
        }
    }
}

*
*
*import java.util.*;
import java.io.*;
import java.math.*;

public class C{
    public static void main(String[] args){
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] arr=new int[n-1];
        int[] ans=new int[n];
        for(int i=0;i<n-1;i++){
            int x=s.nextInt();
            arr[i]=x;
            ans[i+1]=ans[i]+arr[i];
        }
        int smallest=-1;
        for(int i=0;i<n;i++) {
        	if(ans[i]!=0 &&ans[i]/Math.abs(ans[i])==-1) {
        		smallest=Integer.max(-ans[i], smallest);
        	}else if(ans[i]==0) {
        		smallest=Integer.max(0, smallest);
        	}
        }
        for(int i=0;i<n;i++) {
        	ans[i]+=smallest+1;
        }
        boolean[] check=new boolean[n];
        for(int i=0;i<n;i++) {
        	if(ans[i]>n) {
        		System.out.println(-1);
        		return;
        	}else {
        		check[ans[i]-1]=true;
        	}
        }
        boolean flag=true;
        for(int i=0;i<n;i++) {
        	flag&=check[i];
        }
        if(!flag) {
        	System.out.println(-1);
    		
    		return;
        }else{
        	for(int i=0;i<n;i++) {
        		System.out.print(ans[i]+" ");
        	}
        }
    }
}



import java.util.*;
import java.io.*;
import java.math.*;

public class B{
    public static void main(String[] args){
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int[] arr=new int[2*n];
        for(int i=0;i<n;i++){
            int x=s.nextInt();
            arr[i]=x;
            arr[i+n]=x;
        }
        int globalcount=0;
        for(int i=0;i<2*n;i++){
            int count=0;
            while(i<2*n && arr[i]==1){
                count++;
                i++;
            }
            globalcount=Integer.max(globalcount,count);
        }
        System.out.println(globalcount);
    }
}
*/
	public static int AmazingNess(int n) {
		String str=Integer.toString(n);
		HashSet<Integer> s=new HashSet<Integer>();
		int ans=0;
		for(int i=0;i<str.length();i++) {
			int val=0;
			for(int j=i;j<str.length();j++) {
				val^=(str.charAt(j)-'0');
				if(!s.contains(val)) {
					ans+=val;
					s.add(val);
				}
			}
		}
		return ans;
	}
	
	public static void AllSubsets(int[] arr,int pointer,int sum) {
		if(pointer>=arr.length) {
			allsum.add(sum);
			return;
		}
		AllSubsets(arr, pointer+1, sum+arr[pointer]);
		AllSubsets(arr, pointer+1, sum);
	}
	
	public static long value(long number) {
		long odd=0;
		long even=0;
		String str=Long.toString(number);
		for(int i=0;i<str.length();i++) {
			if((i&1)==0) {
				odd+=str.charAt(i)-'0';
			}else {
				even+=str.charAt(i)-'0';
			}
		}
		return Math.abs(odd-even);
	}
	
	public static void Cases(String str,int pointer,String ans) {
		if(pointer>=str.length()) {
			out.println(ans);
			return;
		}
		char cc=str.charAt(pointer);
		StringBuilder temp=new StringBuilder();
		temp.append(ans);
		temp.append((char)((int)(cc-'0'-1)+'a'));
		Cases(str,pointer+1,temp.toString());
		if(pointer+1<str.length()) {
			int nc=str.charAt(pointer+1)-'0';
			int temp2=cc-'0';
			temp2*=10;
			temp2+=(int)(nc);
			nc=temp2;
			if(nc>=1 && nc<=26) {
				nc--;
				StringBuilder temp1=new StringBuilder();
				temp1.append(ans);
				temp1.append((char)(nc+'a'));
				Cases(str, pointer+2, temp1.toString());
			}
		}
	}
	
	public static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}
	
	public static PrintWriter out;
	
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct 

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception e) {
				e.printStackTrace();
			}
			return str;
		}
	}
	
}
