Module:Tree chart

local p = {}

local cells = { ['!b'] = '	', ['!t'] = '  ', ['%b'] = '    ', ['%t'] = '   ', ['\'b'] = '  ', ['\'t'] = '  ', ['(b'] = ' ',	['(t'] = '   ', [')b'] = '  ',	[')t'] = '    ', ['*b'] = '    ', ['*t'] = '   ', ['+b'] = '    ', ['+t'] = '   ', [',b'] = '    ', [',t'] = '  <td style="border-bottom: 1px solid black;">  ', ['-b'] = ' ', ['-t'] = '<td colspan="2" style="border-bottom: 1px solid black;"> ', ['.b'] = '<td style="border-right: 1px solid black;"> ', ['.t'] = '<td style="border-bottom: 1px solid black;">  ', ['7b'] = '<td style="border-right: 1px dashed black;"> ', ['7t'] = '<td style="border-bottom: 1px dashed black;">  ', [':b'] = '	', [':t'] = '<td rowspan="2" style="border-right: 1px dashed black;">  ', ['Ab'] = ' ', ['At'] = '<td style="border-right: 1px dashed black; border-bottom: 1px dashed black;"> <td style="border-bottom: 1px dashed black;">  ', ['Cb'] = '<td style="border-right: 1px dashed black;"> ', ['Ct'] = '<td style="border-right: 1px dashed black; border-bottom: 1px dashed black;">  ', ['Db'] = '  ', ['Dt'] = '<td rowspan="2" style="border-right: 1px dashed black;"> <td style="border-bottom: 1px dashed black;">  ', ['Fb'] = '<td style="border-right: 1px dashed black;">    ', ['Ft'] = '  <td style="border-bottom: 1px dashed black;">  ', ['Gb'] = '<td style="border-right: 1px dotted black;"> ', ['Gt'] = '<td style="border-right: 1px dotted black; border-bottom: 1px dotted black;">  ', ['Hb'] = '  ', ['Ht'] = '<td rowspan="2" style="border-right: 1px dotted black;"> <td style="border-bottom: 1px dotted black;">  ', ['Jb'] = '  ', ['Jt'] = '<td style="border-right: 1px dashed black; border-bottom: 1px dashed black;">  ', ['Lb'] = ' ', ['Lt'] = '<td style="border-right: 1px dashed black;"> <td style="border-bottom: 1px dashed black;">  ', ['Mb'] = '<td style="border-right: 1px dotted black;">    ', ['Mt'] = '<td colspan="2" style="border-bottom: 1px dotted black;"> ', ['Pb'] = ' ', ['Pt'] = '<td colspan="2" style="border-bottom: 1px dotted black;"> ', ['Qb'] = '', ['Qt'] = '<td rowspan="2" style="border-right: 1px dotted black;">  ', ['Rb'] = '<td style="border-right: 1px dotted black;">    ', ['Rt'] = '<td style="border-right: 1px dotted black; border-bottom: 1px dotted black;"> <td style="border-bottom: 1px dotted black;">  ', ['Sb'] = '<td style="border-right: 1px dotted black;">    ', ['St'] = '  <td style="border-bottom: 1px dotted black;">  ', ['T3b'] = '<td style="border-right: 1px solid black;"> ', ['T3t'] = '<td style="border-bottom: 1px dotted black;">  ', ['Tb'] = '<td style="border-right: 1px dotted black;"> ', ['Tt'] = '<td style="border-bottom: 1px dotted black;">  ', ['Vb'] = '<td style="border-right: 1px dashed black;">    ', ['Vt'] = '<td colspan="2" style="border-bottom: 1px dashed black;"> ', ['Wb'] = ' ', ['Wt'] = '<td style="border-right: 1px dotted black; border-bottom: 1px dotted black;"> <td style="border-bottom: 1px dotted black;">  ', ['Yb'] = ' ', ['Yt'] = '<td style="border-right: 1px dotted black;"> <td style="border-bottom: 1px dotted black;">  ', ['Zb'] = '  ', ['Zt'] = '<td style="border-right: 1px dotted black; border-bottom: 1px dotted black;">  ', ['^b'] = ' ', ['^t'] = '<td style="border-right: 1px solid black; border-bottom: 1px solid black;"> <td style="border-bottom: 1px solid black;">  ', [' b'] = '	', [' t'] = '<td rowspan="2" colspan="2"> ', ['`b'] = ' ', ['`t'] = '<td style="border-right: 1px solid black;"> <td style="border-bottom: 1px solid black;">  ', ['a2b'] = '<td style="border-right: 1px dotted black;">    ', ['a2t'] = '<td style="border-right: 1px dotted black; border-bottom: 1px dashed #000001;"> <td style="border-bottom: 1px dashed black;">  ', ['ab'] = '<td style="border-right: 1px dotted black;">    ', ['at'] = '<td style="border-right: 1px dotted black; border-bottom: 1px solid black;"> <td style="border-bottom: 1px solid black;">  ', ['b2b'] = '<td style="border-right: 1px dashed black;">    ', ['b2t'] = '<td style="border-right: 1px dashed black; border-bottom: 1px dotted #000001;"> <td style="border-bottom: 1px dotted black;">  ', ['b3b'] = '<td style="border-right: 1px solid black;">    ', ['b3t'] = '<td style="border-right: 1px solid black; border-bottom: 1px dashed black;"> <td style="border-bottom: 1px dotted black;">  ', ['bb'] = '<td style="border-right: 1px solid black;">    ', ['bt'] = '<td style="border-right: 1px solid black; border-bottom: 1px dotted black;"> <td style="border-bottom: 1px dotted black;">  ', ['cb'] = '<td style="border-right: 1px dashed black;"> ', ['ct'] = '<td style="border-right: 1px dashed black; border-bottom: 1px solid black;">  ', ['db'] = '  ', ['dt'] = '<td rowspan="2" style="border-right: 1px dashed black;"> <td style="border-bottom: 1px solid black;">  ', ['eb'] = '<td style="border-right: 1px solid black;"> ', ['et'] = '<td style="border-right: 1px solid black; border-bottom: 1px dashed black;">  ', ['fb'] = '  ', ['ft'] = '<td rowspan="2" style="border-right: 1px solid black;"> <td style="border-bottom: 1px dashed black;">  ', ['hb'] = ' ', ['ht'] = '<td style="border-right: 1px solid black; border-bottom: 1px dashed black;"> <td style="border-bottom: 1px dashed black;">  ', ['ib'] = ' ', ['it'] = '<td style="border-right: 1px dashed black; border-bottom: 1px solid black;"> <td style="border-bottom: 1px solid black;">  ', ['jb'] = '<td style="border-right: 1px dashed black;">    ', ['jt'] = '<td colspan="2" style="border-bottom: 1px solid black;"> ', ['k2b'] = '  ', ['k2t'] = '<td rowspan="2" style="border-right: 1px dotted black;"> <td style="border-bottom: 1px dashed black;">  ', ['k3b'] = '<td style="border-right: 1px dashed black;">    ', ['k3t'] = '<td style="border-right: 1px solid black;"> <td style="border-bottom: 1px dashed black;">  ', ['kb'] = '  ', ['kt'] = '<td rowspan="2" style="border-right: 1px dotted black;"> <td style="border-bottom: 1px solid black;">  ', ['l2b'] = '<td style="border-right: 1px dotted black;"> ', ['l2t'] = '<td style="border-right: 1px dotted black; border-bottom: 1px dashed #000001;">  ', ['l3b'] = '<td style="border-right: 1px dashed black;"> ', ['l3t'] = '<td style="border-right: 1px solid black; border-bottom: 1px solid black;">  ', ['lb'] = '<td style="border-right: 1px dotted black;"> ', ['lt'] = '<td style="border-right: 1px dotted black; border-bottom: 1px solid black;">  ', ['m2b'] = '<td style="border-right: 1px dashed black;">    ', ['m2t'] = '<td colspan="2" style="border-bottom: 1px dotted black;"> ', ['mb'] = '<td style="border-right: 1px solid black;">    ', ['mt'] = '<td colspan="2" style="border-bottom: 1px dotted black;"> ', ['n2b'] = ' ', ['n2t'] = '<td style="border-right: 1px dashed black; border-bottom: 1px dotted #000001;"> <td style="border-bottom: 1px dotted black;">  ', ['nb'] = ' ', ['nt'] = '<td style="border-right: 1px solid black; border-bottom: 1px dotted black;"> <td style="border-bottom: 1px dotted black;">  ', ['o2b'] = '  ', ['o2t'] = '<td rowspan="2" style="border-right: 1px dashed black;"> <td style="border-bottom: 1px dotted black;">  ', ['ob'] = '  ', ['ot'] = '<td rowspan="2" style="border-right: 1px solid black;"> <td style="border-bottom: 1px dotted black;">  ', ['p2b'] = '<td style="border-right: 1px dashed black;"> ', ['p2t'] = '<td style="border-right: 1px dashed black; border-bottom: 1px dotted #000001;">  ', ['pb'] = '<td style="border-right: 1px solid black;"> ', ['pt'] = '<td style="border-right: 1px solid black; border-bottom: 1px dotted black;">  ', ['q2b'] = ' ', ['q2t'] = '<td style="border-right: 1px dotted black; border-bottom: 1px dashed #000001;"> <td style="border-bottom: 1px dashed black;">  ', ['qb'] = ' ', ['qt'] = '<td style="border-right: 1px dotted black; border-bottom: 1px solid black;"> <td style="border-bottom: 1px solid black;">  ', ['r2b'] = '<td style="border-right: 1px dotted black;">    ', ['r2t'] = '<td colspan="2" style="border-bottom: 1px dashed black;"> ', ['rb'] = '<td style="border-right: 1px dotted black;">    ', ['rt'] = '<td colspan="2" style="border-bottom: 1px solid black;"> ', ['tb'] = '<td style="border-right: 1px solid black;">    ', ['tt'] = '<td style="border-right: 1px solid black; border-bottom: 1px dashed black;"> <td style="border-bottom: 1px dashed black;">  ', ['vb'] = '<td style="border-right: 1px solid black;">    ', ['vt'] = '<td colspan="2" style="border-bottom: 1px solid black;"> ', ['xb'] = '	', ['xt'] = '	', ['yb'] = '<td style="border-right: 1px solid black;">    ', ['yt'] = '<td colspan="2" style="border-bottom: 1px dashed black;"> ', ['~b'] = ' ', ['~t'] = '<td colspan="2" style="border-bottom: 1px dashed black;"> ', }