class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: B = None
        self.u: B = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.x: B = None
        self.t: F = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

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

e = A("e")
c = B("c")
j = C("j")
i = D("i")
d = E("d")
f = F("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: D = None
        self.x: B = None
        self.t: F = None
        self.z: F = None
        self.r: D = None
        self.txt = txt

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

e = A("e")
c = B("c")
j = C("j")
i = D("i")
d = E("d")
f = F("f")

e.x = j
e.r = c
e.u = c
e.w = d
e.q = f
c.z = j
c.s = d
c.o = i
c.p = i
c.x = f
c.r = e
j.v = d
j.t = e
j.y = f
j.o = c
j.r = c
i.v = j
d.s = e
d.v = i
d.r = i
d.x = c
d.t = f
d.z = f
f.z = i
f.t = i
f.w = i
f.p = i
f.q = d
assert c.x.q.s.u.o.txt == "i"