const res =require('fs').readFileSync('/dev/stdin','utf8')
    .match(/^[\s\S]*?(?=\n0 0)/g)[0]
    .split('\n')
    .map(r=>r.split(' ')
        .map(Number))
    .map(([H,W])=>[...Array(H).keys()]
        .map(i=>[...Array(W).keys()]
            .map(j=>(i%2===j%2?'#':'.'))
            .join(''))
        .join('\n'))
    .join('\n\n')
    .concat('\n');
console.log(res)
