# Test case
{a{b}}
{b{a}}
1
{(0,0),(1,1)}
# only (x,x)
{b{x}{a{y}{c}}}
{c{a}{x{b}{y}}}
2
{(0,0),(1,2),(3,3),(4,4)}
# only (x,x)
{b{x}{a{y}{c}}}
{c{a}{x{b}{y}}}
6
{(0,3),(4,4)}
# (x,x),(c,c)
{c{x}{a{y}{b}}}
{c{a}{x{b}{y}}}
6
{(0,3),(4,4)}
# (x,x),(c,c)
{c{x}{a{y}{b}}}
{c{a}{x{b}{y}}}
2
{(0,0),(1,2),(3,3),(4,4)}
#
{a{b{c{d{e}}}{f{g}}{h{i{j}}{k{l}{m}}{n{o}}{p{q}}}}{r{s{t}}}}
{a{b{e}{t{g}}{h{j}{l}{q}{n{o}}{p}}}{r{s{y}}}}
5
{(0,0),(3,1),(4,2),(5,3),(7,4),(8,5),(10,6),(11,7),(13,8),(14,9),(15,10),(16,11),(17,12),(18,13),(19,14)}
#
{a{b{c{d{e}}}{f{g}}{h{i{j}}{k{l}{m}}{n{o}}{p{q}}}}{r{s{t}}}}
{a{b{e}{t{g}}{h{j}{l}{k}{n{o}}{p}}}{r{s{y}}}}
5
{(0,0),(3,1),(4,2),(5,3),(7,4),(8,5),(10,6),(11,7),(13,8),(14,9),(15,10),(16,11),(17,12),(18,13),(19,14)}
#
{d{a}{b}{c}}
{f{e{a}{b}}{d{c}}}
2
{(0,0),(1,1),(2,3),(3,5)}
#
{d{a}{b}{c}}
{f{e{a}{b}}{d{c}}}
1
{}
# bozen pair (31, 16)
{stradivaristrasse{2}{4{{1}{2}{4}}}{6}}
{pascolistrasse{2{{2}{4}}}}
3
{(2,0),(3,1),(4,2),(5,3),(7,4)}
# bozen pair (29, 23)
{keplero strasse{1}{3}{5{{1}{2}}}{7}}
{laurinstrasse{1}{2{A}{C}}{4}{7}}
7
{(0,0),(3,3),(6,5),(7,6)}
# bozen pair (25, 8)
{raiffeisenstrasse{2{{24}}}{4}{5}{13}}
{p. mitterhofer str.{1}{2}}
7
{(2,1),(6,2)}
# bozen pair (474404, 474405) [simplified, k must be large enough to allow all mappings]
{art{key{1}}{aut{2}}{tit{3}{sub{4}}}{yea{5}}}
{art{key{11}}{aut{22}}{aut{33}}{tit{44}{sub{55}}}{yea{66}}}
6
{(0,0),(1,1),(2,2),(3,3),(4,6),(5,7),(6,8),(7,9),(8,10),(9,11),(10,12)}
# bozen pair (65, 66) - single label
{o{o{o{o}{o}}}{o}{o{o}{o}}{o{o{o}{o}}}{o}{o}{o}{o{o}{o}}{o}}
{o{o}{o{o{o}{o}{o}{o}{o}{o}{o}{o}{o}}}{o{o{o}{o}}}{o{o{o}}}}
10
{(0,0),(1,1),(4,4),(5,5),(6,6),(8,8),(9,9),(12,13),(14,16),(19,19)}
# Sentiment (1545,924)
{3{3{2 Hugely}{3 accomplished}}{3{2{2 slice}{2{2 of}{3{3 Hitchcockian}{2 suspense}}}}{2 .}}}
{4{4{3{2 The}{4{2 most}{3{3 compelling}{4{2 Wiseman}{3 epic}}}}}{2{2 of}{2{2 recent}{2 years}}}}{2 .}}
15
{(0,2),(1,3),(2,6),(4,9),(5,10),(6,11),(7,12),(9,13),(10,15),(12,16)}
# Sentiment (924,1545)
{4{4{3{2 The}{4{2 most}{3{3 compelling}{4{2 Wiseman}{3 epic}}}}}{2{2 of}{2{2 recent}{2 years}}}}{2 .}}
{3{3{2 Hugely}{3 accomplished}}{3{2{2 slice}{2{2 of}{3{3 Hitchcockian}{2 suspense}}}}{2 .}}}
15
{(2,0),(3,1),(6,2),(9,4),(10,5),(11,6),(12,7),(13,9),(15,10),(16,12)}