Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search. These patterns are most often used to check whether a particular string meets the certain rules.

In this task, a pattern will be a string consisting of small English letters and question marks ('?'). The question mark in the pattern is a metacharacter that denotes an arbitrary small letter of the English alphabet. We will assume that a string matches the pattern if we can transform the string into the pattern by replacing the question marks by the appropriate characters. For example, string aba matches patterns: ???, ??a, a?a, aba.

Programmers that work for the R1 company love puzzling each other (and themselves) with riddles. One of them is as follows: you are given n patterns of the same length, you need to find a pattern that contains as few question marks as possible, and intersects with each of the given patterns. Two patterns intersect if there is a string that matches both the first and the second pattern. Can you solve this riddle?

Input

The first line contains a single integer n (1 ≤ n ≤ 105) — the number of patterns. Next n lines contain the patterns.

It is guaranteed that the patterns can only consist of small English letters and symbols '?'. All patterns are non-empty and have the same length. The total length of all the patterns does not exceed 105 characters.

Output

In a single line print the answer to the problem — the pattern with the minimal number of signs '?', which intersects with each of the given ones. If there are several answers, print any of them.

Examples

Input

2
?ab
??b


Output

xab


Input

2
a
b


Output

?


Input

1
?a?b


Output

cacb

Note

Consider the first example. Pattern xab intersects with each of the given patterns. Pattern ??? also intersects with each of the given patterns, but it contains more question signs, hence it is not an optimal answer. Clearly, xab is the optimal answer, because it doesn't contain any question sign. There are a lot of other optimal answers, for example: aab, bab, cab, dab and so on.
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.TreeSet;




public class solver {
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;
    
    String readString() throws IOException{
        while (tok==null || !tok.hasMoreTokens()){
            try{
                tok=new StringTokenizer(in.readLine());             
            }
            catch(Exception e){
                return null;
            }            
        }
        return tok.nextToken();
    }
    int readInt() throws NumberFormatException, IOException{
        return Integer.parseInt(readString());
    }
    long readLong() throws NumberFormatException, IOException{
        return Long.parseLong(readString());
    }
    double readDouble() throws NumberFormatException, IOException{
        return Double.parseDouble(readString());
    }
    
    final static boolean OJ=System.getProperty("ONLINE_JUDGE")!=null;
    
    
    void init() throws FileNotFoundException{        
        if (OJ){
            in=new BufferedReader(new InputStreamReader(System.in));
            out=new PrintWriter(System.out);  
        }else{          
            in=new BufferedReader(new FileReader("input.txt"));  
            out=new PrintWriter("output.txt");  
            
            in=new BufferedReader(new InputStreamReader(System.in));
            out=new PrintWriter(System.out);
        }
    }    
    int[] iMas(int n) throws NumberFormatException, IOException{
        int[] a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=readInt();
        }
        return a;
    }
    
    
    int gcd (int a, int b) {
        if (b == 0)
            return a;
        else
            return gcd (b, a % b);
    }   
    
    
    
    class Pair implements Comparable<Pair>{
        int b;
        int d;
        String s;
        
        Pair(int x,int y,String s){
            b=x;
            d=y;            
            this.s=s;
        }
                
        @Override
        public int compareTo(Pair o) {          
            return b-o.b;
        }                       
    }
    
    int get(int i,int j,int n){
        if (i+j<=n) return i+j;
        return i+j-n;
    }
    
   
    
    void solve() throws IOException{
        int n=readInt();
        char[] a=readString().toCharArray();
        TreeSet<Integer>[] set=new TreeSet[a.length];
        int nn=a.length;
        for (int i=0;i<nn;i++){
            set[i]=new TreeSet<Integer>();
            set[i].add((int)a[i]);
        }
        
        for (int j=1;j<n;j++){
            a=readString().toCharArray();
            for (int i=0;i<nn;i++){             
                set[i].add((int)a[i]);
            }           
        }
        
        for (int i=0;i<nn;i++){
            if (set[i].size()>2) out.print("?");else{
                if (set[i].size()==1){
                    if (set[i].first()=='?') out.print("a");else out.print((char)(int)set[i].first());
                }else{
                    char[] z=new char[2];
                    int x=0;
                    for (int d:set[i]){
                        z[x]=(char)d;
                        x++;
                    }
                    if (z[0]=='?') out.print(z[1]);else {
                        if (z[1]=='?') out.print(z[0]);else out.print('?');
                    }
                }
            }
            
        }
        
        
        
        
    }
    
    
    void run() throws NumberFormatException, IOException{
        init();
         long h=System.currentTimeMillis();        
        solve();
         System.err.println(System.currentTimeMillis()-h);
        out.close();
    }
    
    
    

    
    public static void main(String[] args) throws NumberFormatException, IOException {
        new solver().run();
    }

}