In geometry a cube net is an arrangement of identical edge-joined squares in the plane which can be folded (along the edges) to become the faces of a cube.
In this problem you need to check if the given figure is a cube net. The given figure will be a union of six identical squares lying in the same plane and will be given to you as a String figure. Each element of figure will consist of '.' (dot) and '#' (sharp) characters only. A sharp represents one of the six squares, whereas a dot represents an empty space. Return "YES" if figure represents a cube net, or "NO" otherwise (all quotes for clarity).