Bob sees a bush with some delicious looking berries beside his campsite. Unfortunately, he never goes outside, and can't tell leaves and berries apart, let alone edible berries and poisonous ones. He wishes to pick all the edible berries, and as a courteous gesture, pick all the poisonous ones too so nobody accidentally eats them. Can you help him?
Bob likes representing things visually. Each bush can be represented by some ASCII characters. with a #
representing a leaf, an o
representing an edible berry, and a *
representing a poisonous berry. A space indicates that neither a leaf or berry is present. Help Bob pick the berries by replacing the berries in the bush with a space.
Input Specification
The first line will contain two integers and , separated by a space, which will represent the width and height of the bush respectively. The next lines will contain characters that represent the bush. Leading and trailing spaces will be given so that every line is characters long.
Output Specification
The first lines will contain characters, an ASCII representation of the picked bush. Leading and trailing spaces should be printed. This will be followed by another line with all of the edible berries from the bush.
Sample Input
8 4
#o##
#*##*#
##o##o##
######
Sample Output
# ##
# ## #
## ## ##
######
ooo
Comments