class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.z: F = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.r: B = None
        self.v: D = None
        self.w: E = None
        self.y: B = None
        self.txt = txt

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

m = A("m")
c = B("c")
i = C("i")
d = D("d")
l = E("l")
h = F("h")
k = E("k")
j = D("j")

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.z: F = None
        self.t: E = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.r: B = None
        self.v: D = None
        self.w: E = None
        self.y: B = None
        self.txt = txt

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

m = A("m")
c = B("c")
i = C("i")
d = D("d")
l = E("l")
h = F("h")
k = E("k")
j = D("j")

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