class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: C = None
        self.s: F = None
        self.z: D = None
        self.t: C = None
        self.p: C = None
        self.q: F = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: F = None
        self.y: A = None
        self.z: F = None
        self.s: B = None
        self.r: B = None
        self.o: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: G = None
        self.u: H = None
        self.x: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.txt = txt

c = A("c")
b = B("b")
m = C("m")
g = D("g")
l = E("l")
k = F("k")
i = G("i")
e = H("e")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: F = None
        self.y: A = None
        self.z: F = None
        self.s: B = None
        self.r: B = None
        self.o: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: G = None
        self.u: H = None
        self.x: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.txt = txt

c = A("c")
b = B("b")
m = C("m")
g = D("g")
l = E("l")
k = F("k")
i = G("i")
e = H("e")

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