class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.o: D = None
        self.q: E = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: F = None
        self.u: E = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

i = A("i")
m = B("m")
g = C("g")
e = D("e")
h = E("h")
f = F("f")
d = B("d")
n = E("n")

i.y = n
i.q = n
i.r = m
i.o = e
i.w = f
i.t = g
m.o = f
g.x = d
g.o = d
g.q = f
e.t = f
e.u = f
e.o = f
e.w = m
h.t = i
h.q = f
h.u = n
h.w = n
h.z = n
f.y = m
f.w = m
f.z = i
f.r = i
f.x = i
f.v = i
d.o = f
n.t = i
n.q = f
n.u = h
n.w = h
n.z = h
assert m.o.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: B = None
        self.o: D = None
        self.q: E = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: F = None
        self.u: E = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

i = A("i")
m = B("m")
g = C("g")
e = D("e")
h = E("h")
f = F("f")
d = B("d")
n = E("n")

i.y = n
i.q = n
i.r = m
i.o = e
i.w = f
i.t = g
m.o = f
g.x = d
g.o = d
g.q = f
e.t = f
e.u = f
e.o = f
e.w = m
h.t = i
h.q = f
h.u = n
h.w = n
h.z = n
f.y = m
f.w = m
f.z = i
f.r = i
f.x = i
f.v = i
d.o = f
n.t = i
n.q = f
n.u = h
n.w = h
n.z = h
assert m.o.v.y.txt == "n"