#!/usr/bin/python3

from sys import stdin
import re

def do_table():
  print("<table cellpadding=2px cellspacing=0>")
  first_line = stdin.readline()
  (op, *top) = first_line.split()
  print("<tr><td style='border-bottom: thin solid black; border-right: thin solid black;' >%s" % op)
  for cell in top:
    print("    <td style='border-bottom: thin solid black;'>%s" % cell)

  while True:
    line = stdin.readline()
    if line == "": raise Exception("done")
    if re.search(r'\S', line) is None: break
    (left, *rest) = line.split()
    print("<tr><td style='border-right: thin solid black;'>%s" % left)
    for cell in rest:
      print("    <td style=''>%s" % cell)
  print("</table>")


print("<table align=center><tr>")
while True:
  print("<td width=33%>")
  do_table()
print("</table>")

