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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        DColoredBoots solver = new DColoredBoots();
        solver.solve(1, in, out);
        out.close();
    }

    static class DColoredBoots {
        public void solve(int testNumber, InputReader in, OutputWriter out) throws IOException {
            int n;
            n = in.nextInt();
            String l, r;
            l = in.nextString();
            r = in.nextString();
        /*pair<char,int> li[n];
        pair<char,int> ri[n];*/
            int freq[][] = new int[27][2];
            for (int i = 0; i < 27; i++)
                for (int j = 0; j < 2; j++)
                    freq[i][j] = 0;
            boolean isUsed[][] = new boolean[n][2];
            for (int i = 0; i < n; i++)
                for (int j = 0; j < 2; j++)
                    isUsed[i][j] = false;
            for (int i = 0; i < n; i++) {
                if (l.charAt(i) == '?')
                    freq[26][0]++;
                else
                    freq[l.charAt(i) - 'a'][0]++;
                if (r.charAt(i) == '?')
                    freq[26][1]++;
                else
                    freq[r.charAt(i) - 'a'][1]++;
            }
            ArrayList<Integer[]> ans = new ArrayList<>();
            int num;
            int x = 0, y = 0;
            int temp[] = new int[2];
            for (int i = 0; i < 26; i++) {
                x = 0;
                y = 0;
                num = Math.min(freq[i][0], freq[i][1]);
                for (int j = 0; j < num; j++) {
                    while (l.charAt(x) != ('a' + i)) x++;
                    while (r.charAt(y) != ('a' + i)) y++;
                    ans.add(new Integer[2]);
                    ans.get(ans.size() - 1)[0] = x;
                    ans.get(ans.size() - 1)[1] = y;
                    isUsed[x][0] = true;
                    isUsed[y][1] = true;
                    x++;
                    y++;
                }
            }
            x = 0;
            y = 0;
            for (int i = 0; i < n && freq[26][0] > 0 && ans.size() != n; i++) {
                while (x < n && (l.charAt(x) != '?' || isUsed[x][0])) x++;
                while (i < n && (isUsed[i][1] || r.charAt(i) == '?')) i++;
                if (x == n || i == n)
                    break;
                ans.add(new Integer[2]);
                ans.get(ans.size() - 1)[0] = x;
                ans.get(ans.size() - 1)[1] = i;
                isUsed[x][0] = true;
                isUsed[i][1] = true;
                x++;
            }
            for (int i = 0; i < n && freq[26][1] > 0 && ans.size() != n; i++) {
                while (y < n && (r.charAt(y) != '?' || isUsed[y][1])) y++;
                while (i < n && (isUsed[i][0] || l.charAt(i) == '?')) i++;
                if (y == n || i == n)
                    break;
                ans.add(new Integer[2]);
                ans.get(ans.size() - 1)[0] = i;
                ans.get(ans.size() - 1)[1] = y;
                isUsed[i][0] = true;
                isUsed[y][1] = true;
                y++;
            }
            for (int i = 0; i < n && freq[26][0] > 0 && ans.size() != n; i++) {
                while (x < n && (l.charAt(x) != '?' || isUsed[x][0])) x++;
                while (i < n && (isUsed[i][1] || r.charAt(i) != '?')) i++;
                if (x == n || i == n)
                    break;
                ans.add(new Integer[2]);
                ans.get(ans.size() - 1)[0] = x;
                ans.get(ans.size() - 1)[1] = i;
                isUsed[x][0] = true;
                isUsed[i][1] = true;
                x++;
            }
            for (int i = 0; i < n && freq[26][1] > 0 && ans.size() != n; i++) {
                while (y < n && (r.charAt(y) != '?' || isUsed[y][1])) y++;
                while (i < n && (isUsed[i][0] || l.charAt(i) != '?')) i++;
                if (y == n || i == n)
                    break;
                ans.add(new Integer[2]);
                ans.get(ans.size() - 1)[0] = i;
                ans.get(ans.size() - 1)[1] = y;
                isUsed[i][0] = true;
                isUsed[y][1] = true;
                y++;
            }
            out.printLine(ans.size());
            for (int i = 0; i < ans.size(); i++)
                out.printLine((ans.get(i)[0] + 1) + " " + (ans.get(i)[1] + 1));
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private static final int DEFAULT_BUFFER_SIZE = 1 << 16;
        private static final InputStream DEFAULT_STREAM = System.in;
        private int c;
        private byte[] buf;
        private int bufferSize;
        private int bufIndex;
        private int numBytesRead;
        private InputStream stream;
        private static final byte EOF = -1;
        private static final byte SPACE = 32;
        private static final byte DASH = 45;
        private char[] charBuffer;
        private static byte[] bytes = new byte[58];
        private static int[] ints = new int[58];
        private static char[] chars = new char[128];

        static {
            char ch = ' ';
            int value = 0;
            byte _byte = 0;
            for (int i = 48; i < 58; i++) bytes[i] = _byte++;
            for (int i = 48; i < 58; i++) ints[i] = value++;
            for (int i = 32; i < 128; i++) chars[i] = ch++;
        }

        public InputReader() {
            this(DEFAULT_STREAM, DEFAULT_BUFFER_SIZE);
        }

        public InputReader(int bufferSize) {
            this(DEFAULT_STREAM, bufferSize);
        }

        public InputReader(InputStream stream) {
            this(stream, DEFAULT_BUFFER_SIZE);
        }

        public InputReader(InputStream stream, int bufferSize) {
            if (stream == null || bufferSize <= 0)
                throw new IllegalArgumentException();
            buf = new byte[bufferSize];
            charBuffer = new char[128];
            this.bufferSize = bufferSize;
            this.stream = stream;
        }

        private int readJunk(int token) throws IOException {

            if (numBytesRead == EOF) return EOF;

            // Seek to the first valid position index
            do {

                while (bufIndex < numBytesRead) {
                    if (buf[bufIndex] > token) return 0;
                    bufIndex++;
                }

                // reload buffer
                numBytesRead = stream.read(buf);
                if (numBytesRead == EOF) return EOF;
                bufIndex = 0;

            } while (true);

        }

        public int nextInt() throws IOException {

            if (readJunk(DASH - 1) == EOF) throw new IOException();
            int sgn = 1, res = 0;

            c = buf[bufIndex];
            if (c == DASH) {
                sgn = -1;
                bufIndex++;
            }

            do {

                while (bufIndex < numBytesRead) {
                    if (buf[bufIndex] > SPACE) {
                        res = (res << 3) + (res << 1);
                        res += ints[buf[bufIndex++]];
                    } else {
                        bufIndex++;
                        return res * sgn;
                    }
                }

                // Reload buffer
                numBytesRead = stream.read(buf);
                if (numBytesRead == EOF) return res * sgn;
                bufIndex = 0;

            } while (true);

        }

        private void doubleCharBufferSize() {
            char[] newBuffer = new char[charBuffer.length << 1];
            for (int i = 0; i < charBuffer.length; i++) newBuffer[i] = charBuffer[i];
            charBuffer = newBuffer;
        }

        public String nextString() throws IOException {
            if (numBytesRead == EOF) return null;
            if (readJunk(SPACE) == EOF) return null;

            for (int i = 0; ; ) {
                while (bufIndex < numBytesRead) {
                    if (buf[bufIndex] > SPACE) {
                        if (i == charBuffer.length) doubleCharBufferSize();
                        charBuffer[i++] = (char) buf[bufIndex++];
                    } else {
                        bufIndex++;
                        return new String(charBuffer, 0, i);
                    }
                }

                // Reload buffer
                numBytesRead = stream.read(buf);
                if (numBytesRead == EOF) return new String(charBuffer, 0, i);
                bufIndex = 0;
            }
        }

    }
}

