class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: E = None
        self.p: G = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: D = None
        self.q: G = None
        self.t: B = None
        self.z: D = None
        self.w: G = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.s: D = None
        self.o: B = None
        self.p: H = None
        self.w: H = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: D = None
        self.y: A = None
        self.u: D = None
        self.q: C = None
        self.p: B = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

m = A("m")
g = B("g")
d = C("d")
n = D("n")
b = E("b")
e = F("e")
l = G("l")
f = H("f")
k = H("k")

m.t = b
g.z = b
g.w = b
g.q = b
g.p = l
g.y = l
d.w = g
d.t = b
n.z = g
n.w = l
n.y = l
b.v = n
b.s = n
b.z = n
b.q = l
b.w = l
b.t = g
b.o = g
b.r = e
e.t = n
e.q = k
e.x = m
e.o = b
l.t = m
l.x = g
l.o = g
l.s = n
l.p = k
l.w = k
l.v = k
f.s = m
f.y = m
f.v = m
f.w = m
f.z = n
f.u = n
f.q = d
f.p = g
k.s = m
k.y = m
k.v = m
k.w = m
k.z = n
k.u = n
k.q = d
k.p = g
assert n.z.p.t.t.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: E = None
        self.p: G = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: D = None
        self.q: G = None
        self.t: B = None
        self.z: D = None
        self.w: G = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: H = None
        self.x: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: B = None
        self.s: D = None
        self.o: B = None
        self.p: H = None
        self.w: H = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: D = None
        self.y: A = None
        self.u: D = None
        self.q: C = None
        self.p: B = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

m = A("m")
g = B("g")
d = C("d")
n = D("n")
b = E("b")
e = F("e")
l = G("l")
f = H("f")
k = H("k")

m.t = b
g.z = b
g.w = b
g.q = b
g.p = l
g.y = l
d.w = g
d.t = b
n.z = g
n.w = l
n.y = l
b.v = n
b.s = n
b.z = n
b.q = l
b.w = l
b.t = g
b.o = g
b.r = e
e.t = n
e.q = k
e.x = m
e.o = b
l.t = m
l.x = g
l.o = g
l.s = n
l.p = k
l.w = k
l.v = k
f.s = m
f.y = m
f.v = m
f.w = m
f.z = n
f.u = n
f.q = d
f.p = g
k.s = m
k.y = m
k.v = m
k.w = m
k.z = n
k.u = n
k.q = d
k.p = g
assert n.z.p.t.t.s.w.txt == "l"