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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: I = None
        self.v: D = None
        self.t: D = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: I = None
        self.v: D = None
        self.t: D = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

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

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

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

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