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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.r: F = None
        self.w: H = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: H = None
        self.r: F = None
        self.w: H = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: I = None
        self.t: G = None
        self.txt = txt

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

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