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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: I = None
        self.q: A = None
        self.v: A = None
        self.t: A = None
        self.o: H = None
        self.w: A = None
        self.p: J = None
        self.x: H = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.z: C = None
        self.o: J = None
        self.r: D = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.o: G = None
        self.q: G = None
        self.u: J = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: I = None
        self.q: A = None
        self.v: A = None
        self.t: A = None
        self.o: H = None
        self.w: A = None
        self.p: J = None
        self.x: H = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: G = None
        self.z: C = None
        self.o: J = None
        self.r: D = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.o: G = None
        self.q: G = None
        self.u: J = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

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

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

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