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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: D = None
        self.x: C = None
        self.p: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.r: C = None
        self.w: A = None
        self.q: H = None
        self.x: G = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

g = A("g")
a = B("a")
d = C("d")
n = D("n")
l = E("l")
i = F("i")
b = G("b")
c = H("c")
e = C("e")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: D = None
        self.x: C = None
        self.p: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.r: C = None
        self.w: A = None
        self.q: H = None
        self.x: G = None
        self.o: G = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

g = A("g")
a = B("a")
d = C("d")
n = D("n")
l = E("l")
i = F("i")
b = G("b")
c = H("c")
e = C("e")

g.t = b
a.x = l
a.z = i
d.o = c
d.v = n
d.x = e
d.p = b
n.u = a
l.z = b
l.p = b
l.o = a
l.v = a
l.r = d
l.q = e
l.t = i
i.t = a
i.y = d
i.r = d
i.w = g
i.q = c
i.x = b
i.o = b
i.u = l
b.t = n
c.v = i
c.q = i
c.r = g
c.t = b
c.s = l
c.w = n
c.u = d
c.z = a
e.o = c
e.v = n
e.x = d
e.p = b
assert b.t.u.z.w.t.txt == "b"