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

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

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

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

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

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

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

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

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

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

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

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

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

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

c.v = e
i.s = l
l.w = e
l.r = e
l.q = b
m.z = e
m.w = i
m.t = i
e.q = c
b.x = c
b.v = m
b.u = l
b.q = i
assert e.q.v.q.v.txt == "e"