class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: D = None
        self.y: C = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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