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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.s: 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: C = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: G = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
n = C("n")
f = D("f")
i = E("i")
l = F("l")
j = G("j")
g = H("g")
c = H("c")

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.s: 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: C = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: G = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
n = C("n")
f = D("f")
i = E("i")
l = F("l")
j = G("j")
g = H("g")
c = H("c")

m.s = i
m.z = i
m.u = n
m.p = n
m.q = n
e.o = m
e.x = f
e.s = i
n.y = j
f.r = n
f.t = e
i.v = f
i.q = f
i.p = e
i.y = e
i.z = j
l.s = g
l.q = j
j.y = c
j.s = m
j.r = m
g.z = n
g.t = n
g.q = j
g.o = f
g.x = e
g.w = m
g.u = c
c.z = n
c.t = n
c.q = j
c.o = f
c.x = e
c.w = m
c.u = g
assert j.r.s.q.t.x.txt == "f"