class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: I = None
        self.u: A = None
        self.r: C = None
        self.z: B = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.t: C = None
        self.y: D = None
        self.x: D = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: F = None
        self.s: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: I = None
        self.u: A = None
        self.r: C = None
        self.z: B = None
        self.w: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: F = None
        self.t: C = None
        self.y: D = None
        self.x: D = None
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: B = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: F = None
        self.s: G = None
        self.w: D = None
        self.txt = txt

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

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