class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.w: C = None
        self.s: B = None
        self.p: G = None
        self.z: C = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: G = None
        self.u: H = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.o: E = None
        self.s: D = None
        self.y: I = None
        self.w: I = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: A = None
        self.r: C = None
        self.p: C = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: F = None
        self.z: C = None
        self.o: H = None
        self.p: A = None
        self.t: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

h.x = d
h.q = c
h.p = c
h.u = c
h.w = b
h.z = b
h.s = i
h.y = f
i.v = m
i.u = m
i.t = m
i.p = m
i.s = c
b.t = d
b.o = d
b.x = f
b.r = f
b.s = e
b.y = a
b.w = a
e.w = i
e.u = h
e.r = b
e.p = b
e.v = c
d.q = a
d.z = f
f.p = l
f.v = l
c.y = m
c.o = m
c.x = f
c.w = f
c.z = b
c.t = b
c.p = l
m.z = b
m.q = f
m.o = e
a.r = b
a.v = l
l.x = d
l.q = c
l.p = c
l.u = c
l.w = b
l.z = b
l.s = i
l.y = f
assert c.p.u.x.v.y.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.w: C = None
        self.s: B = None
        self.p: G = None
        self.z: C = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: G = None
        self.u: H = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.o: E = None
        self.s: D = None
        self.y: I = None
        self.w: I = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: A = None
        self.r: C = None
        self.p: C = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: F = None
        self.z: C = None
        self.o: H = None
        self.p: A = None
        self.t: C = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

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