t = int(input())
for k in range(t):
    l, c = input().split(' ')
    for i in range(int(l)):
        for j in range(int(c)):
            if (i % 2 == 0 and j % 2 == 0) or (i % 2 != 0 and j % 2 != 0):
                print('*', end = "")
            else:
                print('.', end = "")
        print("\n")
