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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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