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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: A = None
        self.x: C = None
        self.r: I = None
        self.u: B = None
        self.q: A = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: G = None
        self.s: A = None
        self.q: G = None
        self.w: E = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: A = None
        self.x: C = None
        self.r: I = None
        self.u: B = None
        self.q: A = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: G = None
        self.s: A = None
        self.q: G = None
        self.w: E = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

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

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