#C10917. Orchard Pattern
Orchard Pattern
Orchard Pattern
You are given two positive integers N and M. Your task is to generate an orchard grid pattern where each cell represents a tree. In this pattern, a cell at row (i) and column (j) (considering 0-indexing) will contain an apple ('A') if ((i + j) \mod 2 = 0) and an orange ('O') otherwise.
Print N lines where each line is a string of length M representing the corresponding row of the orchard.
inputFormat
The input consists of two space-separated integers N and M, where N is the number of rows and M is the number of columns.
outputFormat
Output exactly N lines. Each line should be a string of length M that represents a row of the orchard pattern.## sample
3 4
AOAO
OAOA
AOAO
</p>