It was senseless, amusing, and a bit terrifying. In a sea, or maybe in an
ocean, or even on a planet completely covered with water there were 40 small islands. There was a castle with its own insignia and name on each island. Each island, or, more exactly, each castle was connected with three neighboring islands. Our neighbors were the Twelfth, the Twenty Fourth, and the Thirtieth islands…
This is how Sergey Lukyanenko, a famous Russian science fiction writer, describes in his novel a mysterious world where teenagers
have got into. A fictitious world. Or perhaps a possible one? You are to answer this question.
Well, let's formalize the literary description of the world. Assume that the islands are located at nodes of an integer grid and form a rectangle. Every island is connected by bridges with exactly three neighboring islands (two islands are neighboring if the distance between them doesn't exceed 1.42). The bridges do not intersect and have the following property: for any two islands, there is a chain of bridges connecting them. Moreover, the destruction of any one bridge doesn't violate this property.
Try to determine what dimensions may have the rectangle of islands in order to make
such a world possible.
There are two numbers in the input: the width and the height of a rectangle. Both numbers are in the range from 1 to 50.
If such a world is possible for the given dimensions, output a map (any one) of this world, following the agreements: an island is denoted by the Latin letter "O", a bridge is denoted by an appropriate symbol from the set "-|/\". Spaces denote an area without islands and bridges (in the example below spaces are replaced with dots in order to make it clearer).
If such a world can not exist, output the phrase "Imaginary world".
Problem Author: Aleksandr Klepinin
Problem Source: The Ural State University Championship, October 29, 2005