def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a
   
def main():
    while True:
        a = numinput()
        if a[0] == 0 and a[1] == 0: break
        H = a[0];  W = a[1]
        for i in range(H):
            bar = ""
            for j in range(W):
                if i + j == 0: bar += "#"
                else: bar += "."
            if i < H - 1: print(bar)
            else: print(bar + '\n')
   
if __name__ == "__main__":
    main()
