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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

c = A("c")
i = B("i")
b = C("b")
f = D("f")
d = E("d")
m = F("m")

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

c = A("c")
i = B("i")
b = C("b")
f = D("f")
d = E("d")
m = F("m")

c.v = b
c.s = i
c.x = i
c.o = d
c.q = d
i.v = m
b.t = m
f.o = c
f.p = m
f.y = b
d.z = b
d.u = i
d.x = i
m.z = d
assert i.v.z.z.txt == "b"