class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.z: B = None
        self.txt = txt

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

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

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

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