class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: I = None
        self.v: H = None
        self.p: D = None
        self.s: H = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: J = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.z: J = None
        self.x: J = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

k = A("k")
e = B("e")
n = C("n")
j = D("j")
l = E("l")
a = F("a")
b = G("b")
d = H("d")
c = I("c")
m = J("m")

k.x = a
k.y = c
k.r = c
k.v = d
k.s = d
k.p = j
e.s = m
n.y = j
n.o = m
n.u = c
j.t = n
j.y = l
j.q = m
l.p = e
l.u = a
l.z = m
l.x = m
l.s = c
a.x = m
b.y = e
b.p = e
d.z = m
c.y = l
m.v = j
assert l.u.x.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: I = None
        self.v: H = None
        self.p: D = None
        self.s: H = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: J = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.z: J = None
        self.x: J = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

k = A("k")
e = B("e")
n = C("n")
j = D("j")
l = E("l")
a = F("a")
b = G("b")
d = H("d")
c = I("c")
m = J("m")

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