#!/usr/bin/env python3

import sys

NS = "http://www.w3.org/2000/svg"
SVG = '<svg xmlns="{}" width="{}" height="{}" viewBox="0 0 {} {}">'
RECT = ' <rect x="{0}" y="{1}" width="{2}" height="{2}" fill="{3}"/>'

width = 0
height = 0
objects = []

for line in sys.stdin:
	line = line.strip()
	for i in range(len(line)):
		if line[i] == '#':
			objects.append({
				"kind": "wall",
				"x": i,
				"y": height
			})
		elif line[i] == '+':
			objects.append({
				"kind": "column",
				"x": i,
				"y": height
			})
		elif line[i] == '*':
			objects.append({
				"kind": "fountain",
				"x": i,
				"y": height
			})
	if len(line) > width:
		width = len(line)
	height += 1

print(SVG.format(NS, width * 25, height * 25, width, height))
print(RECT.format(0, 0, width, height, "black"))
for i in objects:
	if i["kind"] == "wall":
		print(RECT.format(i["x"], i["y"], 0.9, "firebrick"))
	elif i["kind"] == "column":
		print(RECT.format(i["x"] + 0.2, i["y"] + 0.2, 0.6, "gray"))
	elif i["kind"] == "fountain":
		print(RECT.format(i["x"], i["y"], 1, "gray"))
		print(RECT.format(i["x"] + 0.2, i["y"] + 0.2, 0.6, "blue"))
print("</svg>")
