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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.q: A = None
        self.p: C = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: A = None
        self.u: H = None
        self.v: H = None
        self.o: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.r: E = None
        self.s: C = None
        self.t: D = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

b = A("b")
h = B("h")
e = C("e")
l = D("l")
k = E("k")
j = F("j")
a = G("a")
n = H("n")

b.p = h
b.t = h
h.y = k
h.w = k
h.o = l
e.z = j
e.q = b
l.u = h
l.y = e
k.z = e
j.o = k
j.s = e
j.p = e
j.r = e
j.q = b
j.z = b
a.s = k
a.y = b
a.u = n
a.v = n
a.o = j
a.r = e
n.o = e
n.s = e
n.z = a
n.v = a
n.r = k
n.t = l
n.u = j
assert h.w.z.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.q: A = None
        self.p: C = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: A = None
        self.u: H = None
        self.v: H = None
        self.o: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.r: E = None
        self.s: C = None
        self.t: D = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

b = A("b")
h = B("h")
e = C("e")
l = D("l")
k = E("k")
j = F("j")
a = G("a")
n = H("n")

b.p = h
b.t = h
h.y = k
h.w = k
h.o = l
e.z = j
e.q = b
l.u = h
l.y = e
k.z = e
j.o = k
j.s = e
j.p = e
j.r = e
j.q = b
j.z = b
a.s = k
a.y = b
a.u = n
a.v = n
a.o = j
a.r = e
n.o = e
n.s = e
n.z = a
n.v = a
n.r = k
n.t = l
n.u = j
assert h.w.z.q.t.txt == "h"