class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.w: E = None
        self.y: C = None
        self.t: E = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: D = None
        self.w: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: H = None
        self.r: F = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: F = None
        self.z: B = None
        self.w: A = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

b = A("b")
a = B("a")
d = C("d")
h = D("h")
c = E("c")
l = F("l")
f = G("f")
i = H("i")

b.z = i
b.o = c
b.w = c
b.t = c
b.p = c
b.y = d
b.q = l
a.u = h
d.u = a
d.s = a
d.p = h
d.w = c
h.v = l
h.r = l
h.y = i
h.w = i
c.q = b
c.t = b
c.z = b
l.q = c
l.o = c
l.z = c
l.s = b
l.t = h
l.u = d
f.p = d
f.r = l
f.z = a
f.w = b
f.o = c
f.u = c
i.p = f
assert b.t.t.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.w: E = None
        self.y: C = None
        self.t: E = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: D = None
        self.w: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: H = None
        self.r: F = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: F = None
        self.z: B = None
        self.w: A = None
        self.o: E = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

b = A("b")
a = B("a")
d = C("d")
h = D("h")
c = E("c")
l = F("l")
f = G("f")
i = H("i")

b.z = i
b.o = c
b.w = c
b.t = c
b.p = c
b.y = d
b.q = l
a.u = h
d.u = a
d.s = a
d.p = h
d.w = c
h.v = l
h.r = l
h.y = i
h.w = i
c.q = b
c.t = b
c.z = b
l.q = c
l.o = c
l.z = c
l.s = b
l.t = h
l.u = d
f.p = d
f.r = l
f.z = a
f.w = b
f.o = c
f.u = c
i.p = f
assert b.t.t.p.z.txt == "b"