import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        
        String symbol = "#";
        String dot = ".";
        
        while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        }
        
        System.out.print(sb);
    }
}

class Rectangle {
    private int hight;
    private int wide;
    
    Rectangle(int hight, int wide){
        this.hight = hight;
        this.wide = wide;
    }
    
    String makeFrame(String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
    
    String makeRectangle(String symbol){
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
    
    String makeCheck (String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        
        String symbol = "#";
        String dot = ".";
        
        while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        }
        
        System.out.print(sb);
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        
        String symbol = "#";
        String dot = ".";
        
        while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        }
        
        System.out.print(sb);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        
        String symbol = "#";
        String dot = ".";
        
        while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        }
        
        System.out.print(sb);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String symbol = "#"; symbol "#" String dot = "."; dot "." while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        } true {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        } String[] ary = br.readLine().split(" "); ary br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int numH = Integer.parseInt(ary[0]); numH Integer.parseInt(ary[0]) Integer.parseInt Integer ary[0] ary 0 int numW = Integer.parseInt(ary[1]); numW Integer.parseInt(ary[1]) Integer.parseInt Integer ary[1] ary 1 if(numH == 0 && numW == 0){
                break;
            } numH == 0 && numW == 0 numH == 0 numH 0 numW == 0 numW 0 {
                break;
            } break; Rectangle rt = new Rectangle(numH, numW); rt new Rectangle(numH, numW) System.out.print(rt.makeCheck(symbol, dot)) System.out.print System.out System System.out rt.makeCheck(symbol, dot) rt.makeCheck rt symbol dot System.out.print(sb) System.out.print System.out System System.out sb String[] args args class Rectangle {
    private int hight;
    private int wide;
    
    Rectangle(int hight, int wide){
        this.hight = hight;
        this.wide = wide;
    }
    
    String makeFrame(String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
    
    String makeRectangle(String symbol){
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
    
    String makeCheck (String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
} Rectangle private int hight; hight private int wide; wide Rectangle(int hight, int wide){
        this.hight = hight;
        this.wide = wide;
    } Rectangle {
        this.hight = hight;
        this.wide = wide;
    } this.hight = hight this.hight this this.hight hight this.wide = wide this.wide this this.wide wide int hight hight int wide wide String makeFrame(String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    } makeFrame {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        } int i = 0; int i = 0; i 0 i < hight i hight i++ i++ i {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        } {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        } for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            } int j = 0; int j = 0; j 0 j < wide j wide j++ j++ j {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            } {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            } if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                } i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1) j == 0 i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1) i == 0 i 0 i == (hight - 1) i (hight - 1) hight 1 j == 0 j 0 j == (wide - 1) j (wide - 1) wide 1 {
                    sb.append(symbol);
                } sb.append(symbol) sb.append sb symbol {
                    sb.append(dot);
                } sb.append(dot) sb.append sb dot sb.append("\n") sb.append sb "\n" sb.append("\n") sb.append sb "\n" return sb.toString(); sb.toString() sb.toString sb String symbol symbol String dot dot String makeRectangle(String symbol){
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    } makeRectangle {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        } int i = 0; int i = 0; i 0 i < hight i hight i++ i++ i {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        } {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        } for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            } int j = 0; int j = 0; j 0 j < wide j wide j++ j++ j {
                sb.append(symbol);
            } {
                sb.append(symbol);
            } sb.append(symbol) sb.append sb symbol sb.append("\n") sb.append sb "\n" sb.append("\n") sb.append sb "\n" return sb.toString(); sb.toString() sb.toString sb String symbol symbol String makeCheck (String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    } makeCheck {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        } int i = 0; int i = 0; i 0 i < hight i hight i++ i++ i {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        } {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        } for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            } int j = 0; int j = 0; j 0 j < wide j wide j++ j++ j {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            } {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            } if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                } j % 2 == 0 && i % 2 == 0 j % 2 == 0 j % 2 j 2 0 i % 2 == 0 i % 2 i 2 0 {
                    sb.append(symbol);
                } sb.append(symbol) sb.append sb symbol if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                } j % 2 == 1 && i % 2 == 1 j % 2 == 1 j % 2 j 2 1 i % 2 == 1 i % 2 i 2 1 {
                    sb.append(symbol);
                } sb.append(symbol) sb.append sb symbol {
                    sb.append(dot);
                } sb.append(dot) sb.append sb dot sb.append("\n") sb.append sb "\n" sb.append("\n") sb.append sb "\n" return sb.toString(); sb.toString() sb.toString sb String symbol symbol String dot dot public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        
        String symbol = "#";
        String dot = ".";
        
        while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        }
        
        System.out.print(sb);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        
        String symbol = "#";
        String dot = ".";
        
        while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        }
        
        System.out.print(sb);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        
        String symbol = "#";
        String dot = ".";
        
        while (true) {
            String[] ary = br.readLine().split(" ");
            int numH = Integer.parseInt(ary[0]);
            int numW = Integer.parseInt(ary[1]);
            
            if(numH == 0 && numW == 0){
                break;
            }
            
            Rectangle rt = new Rectangle(numH, numW);
            System.out.print(rt.makeCheck(symbol, dot));
        }
        
        System.out.print(sb);
    }
}

class Rectangle {
    private int hight;
    private int wide;
    
    Rectangle(int hight, int wide){
        this.hight = hight;
        this.wide = wide;
    }
    
    String makeFrame(String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (i == 0 || i == (hight - 1) || j == 0 || j == (wide - 1)) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
    
    String makeRectangle(String symbol){
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                sb.append(symbol);
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
    
    String makeCheck (String symbol, String dot) {
        StringBuilder sb = new StringBuilder();
        
        for (int i = 0; i < hight; i++) {
            for (int j = 0; j < wide; j++) {
                if (j % 2 == 0 && i % 2 == 0) {
                    sb.append(symbol);
                } else if (j % 2 == 1 && i % 2 == 1) {
                    sb.append(symbol);
                } else {
                    sb.append(dot);
                }
            }
            sb.append("\n");
        }
        sb.append("\n");
        
        return sb.toString();
    }
}