class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: C = None
        self.v: B = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: D = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: I = None
        self.o: F = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: J = None
        self.x: E = None
        self.y: E = None
        self.p: D = None
        self.u: A = None
        self.o: G = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: B = None
        self.w: I = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: D = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: I = None
        self.o: F = None
        self.z: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: J = None
        self.x: E = None
        self.y: E = None
        self.p: D = None
        self.u: A = None
        self.o: G = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: B = None
        self.w: I = None
        self.p: A = None
        self.txt = txt

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

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