class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: D = None
        self.v: H = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: E = None
        self.v: F = None
        self.u: G = None
        self.x: E = None
        self.t: D = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.s: 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.t: E = None
        self.o: E = None
        self.x: F = None
        self.q: B = None
        self.v: C = None
        self.w: E = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: E = None
        self.v: F = None
        self.u: G = None
        self.x: E = None
        self.t: D = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.s: 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.t: E = None
        self.o: E = None
        self.x: F = None
        self.q: B = None
        self.v: C = None
        self.w: E = None
        self.z: H = None
        self.txt = txt

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

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