read ids:string(15)
read h:int w:int
loop h read line:string(w)
write DAA
DDA
D.A

STATEMENT
Place all polyominoes to form predefined 2D shape

INPUT
remaining: IDs of polyominoes to use
line: single line of board - place your polyominoes only on 'O' symbols
