A string consisting of one or more repetitions of da, followed by the character s, is called a Dadas string. For example, das and dadadas are Dadas strings.
You are given an grid consisting of the characters d, a, and s.
In one operation, you may choose a contiguous segment of a single row or a single column and erase all cells in that segment, provided that both of the following conditions hold:
In particular, a chosen segment may not contain an already erased cell, and cells separated by an already erased cell cannot be treated as part of the same segment.
Each cell can be erased at most once. Determine whether it is possible to erase all cells, and if so, find one sequence of operations that does so.
The input is given in the following format:
For each test case, print NO if it is impossible to erase every cell.
Otherwise, print YES on the first line and the number of operations on the second line. On each of the next lines, print an operation as . It erases every cell from through in one row moving right, or in one column moving down.
Each case is given in the following format:
is a string of length describing row of the grid.
If there are multiple solutions, print any of them.
das