class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: I = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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