class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: E = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: D = None
        self.r: D = None
        self.u: B = None
        self.p: B = None
        self.y: E = None
        self.o: J = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: G = None
        self.z: C = None
        self.u: G = None
        self.s: J = None
        self.q: A = None
        self.w: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: D = None
        self.r: D = None
        self.u: B = None
        self.p: B = None
        self.y: E = None
        self.o: J = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: G = None
        self.z: C = None
        self.u: G = None
        self.s: J = None
        self.q: A = None
        self.w: J = None
        self.txt = txt

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

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

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

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