class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.t: B = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: C = None
        self.r: F = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.s: F = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: H = None
        self.x: C = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

a = A("a")
l = B("l")
i = C("i")
h = D("h")
c = E("c")
f = F("f")
g = G("g")
j = H("j")
k = C("k")
m = D("m")

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: C = None
        self.r: F = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.s: F = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: H = None
        self.x: C = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

a = A("a")
l = B("l")
i = C("i")
h = D("h")
c = E("c")
f = F("f")
g = G("g")
j = H("j")
k = C("k")
m = D("m")

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