Andrey received a postcard from Irina. It contained only the words "Hello, Andrey!", and a strange string consisting of lowercase Latin letters, snowflakes and candy canes. Andrey thought that this string is an encrypted message, and decided to decrypt it.

Andrey noticed that snowflakes and candy canes always stand after the letters, so he supposed that the message was encrypted as follows. Candy cane means that the letter before it can be removed, or can be left. A snowflake means that the letter before it can be removed, left, or repeated several times.

For example, consider the following string: 

<image>

This string can encode the message «happynewyear». For this, candy canes and snowflakes should be used as follows: 

  * candy cane 1: remove the letter w, 
  * snowflake 1: repeat the letter p twice, 
  * candy cane 2: leave the letter n, 
  * snowflake 2: remove the letter w, 
  * snowflake 3: leave the letter e. 

<image>

Please note that the same string can encode different messages. For example, the string above can encode «hayewyar», «happpppynewwwwwyear», and other messages.

Andrey knows that messages from Irina usually have a length of k letters. Help him to find out if a given string can encode a message of k letters, and if so, give an example of such a message.

Input

The first line contains the string received in the postcard. The string consists only of lowercase Latin letters, as well as the characters «*» and «?», meaning snowflake and candy cone, respectively. These characters can only appear immediately after the letter. The length of the string does not exceed 200.

The second line contains an integer number k (1 ≤ k ≤ 200), the required message length.

Output

Print any message of length k that the given string can encode, or «Impossible» if such a message does not exist.

Examples

Input


hw?ap*yn?eww*ye*ar
12


Output


happynewyear


Input


ab?a
2


Output


aa

Input


ab?a
3


Output


aba

Input


ababb
5


Output


ababb

Input


ab?a
1


Output


Impossible
//package codeforces.CF_530;

import java.io.*;
import java.util.InputMismatchException;

public class C {

    public static final String impossible = "Impossible";
    public static void main(String args[]) throws Exception {
        String s = scn.next();
        char[] arr = s.toCharArray();
        int count = 0, idx = -1;
        for(int i=0; i<arr.length; i++){
            if(arr[i] >='a' && arr[i]<='z') count++;
        }
        int k = scn.nextInt();
        boolean imp = false;
        if(count>k){
            for(int i=1; i<arr.length; i++){
                if(arr[i] == '?' || arr[i] == '*'){
                    char c = arr[i-1];
                    int j = i-1;
                    while (arr[j] == c && count > k){
                        arr[j] = '-';
                        count--;
                    }
                    if(count == k) break;
                }
            }
            if(count != k){
                imp = true;
            }
        }else if(count<k){
            for(int i=1; i<arr.length; i++){
                if(arr[i] == '*'){
                    idx = i-1;
                    break;
                }
            }
            if(idx == -1){
                imp = true;
            }
        }

        if(imp){
            out.println(impossible);
        }else{
            if(idx != -1){
                int times = k-count;
                for(int i=0; i<arr.length; i++){
                    if(i == idx){
                        while (times-->=0){
                            out.print(arr[i]);
                        }
                    }else{
                        if(arr[i] >='a' && arr[i]<='z'){
                            out.print(arr[i]);
                        }
                    }
                }
            }else{
                for(int i=0; i<arr.length; i++){
                    if(arr[i] >='a' && arr[i]<='z'){
                        out.print(arr[i]);
                    }
                }
            }
        }
        out.close();
    }

    static class Pair implements Comparable<Pair> {
        int x, y;
        Pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
        @Override
        public String toString() {
            return this.x + " [" + this.y + "]";
        }
        @Override
        public int compareTo(Pair o) {
            return Integer.compare(this.x, o.x);
        }
        @Override
        public boolean equals(Object obj) {
            if (obj instanceof Pair) {
                Pair o = (Pair) obj;
                return this.y == o.y;
            }
            return false;
        }
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    public static InputReader scn = new InputReader(System.in);
    public static PrintWriter out = new PrintWriter(System.out);
}