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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.s: H = None
        self.y: G = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: H = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
i = C("i")
f = D("f")
d = E("d")
c = F("c")
a = G("a")
m = H("m")
b = D("b")

e.t = i
e.s = j
e.o = m
e.u = c
e.z = f
j.r = i
j.t = d
i.y = a
f.r = a
f.t = j
f.z = d
d.r = m
d.s = m
d.x = m
d.z = a
d.y = a
c.o = e
c.u = m
a.w = c
a.x = f
a.u = j
m.u = b
m.t = j
m.o = a
m.v = a
m.w = f
m.p = e
b.r = a
b.t = j
b.z = d
assert m.v.u.t.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: B = None
        self.o: H = None
        self.u: F = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.s: H = None
        self.y: G = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: H = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
i = C("i")
f = D("f")
d = E("d")
c = F("c")
a = G("a")
m = H("m")
b = D("b")

e.t = i
e.s = j
e.o = m
e.u = c
e.z = f
j.r = i
j.t = d
i.y = a
f.r = a
f.t = j
f.z = d
d.r = m
d.s = m
d.x = m
d.z = a
d.y = a
c.o = e
c.u = m
a.w = c
a.x = f
a.u = j
m.u = b
m.t = j
m.o = a
m.v = a
m.w = f
m.p = e
b.r = a
b.t = j
b.z = d
assert m.v.u.t.s.o.txt == "a"