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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.txt = txt

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

i.y = d
i.s = d
i.w = f
i.r = b
i.x = b
i.u = l
f.s = m
f.w = m
f.o = b
f.z = b
b.o = f
m.w = d
m.v = b
m.o = f
l.t = m
l.w = m
l.z = f
d.y = b
d.z = f
assert f.z.o.o.o.txt == "f"