Ruby
\ndef display_table a\n    h = {}; s = {}; a.each do | _, t, i |\n        t = t.to_i; s[i] = 1; h[t] ||= Hash.new 0; h[t][i] += 1\n    end\n    r = [[\'Table\']
```\ndef display_table a\n    h = {}; s = {}; a.each do | _, t, i |\n        t = t.to_i; s[i] = 1; h[t] ||= Hash.new 0; h[t][i] += 1\n    end\n    r = [[\'Table\'] + (s = s.keys.to_a.sort)]\n    h.to_a.sort.each do | k, h |\n        r << [k.to_s]; s.each { | k | r[-1] << h[k].to_s }\n    end\n    r\nend\n```
[]