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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.s: E = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: C = None
        self.s: B = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

b = A("b")
m = B("m")
e = C("e")
k = D("k")
n = E("n")
i = F("i")

b.v = e
m.z = b
m.u = b
e.y = m
e.z = m
e.s = b
k.w = m
k.p = m
k.q = i
k.s = n
k.y = n
n.u = i
n.p = e
n.s = m
n.t = m
n.q = b
i.s = b
i.y = b
i.z = e
i.w = e
i.r = e
i.q = n
assert e.s.v.s.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.s: E = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: C = None
        self.s: B = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

b = A("b")
m = B("m")
e = C("e")
k = D("k")
n = E("n")
i = F("i")

b.v = e
m.z = b
m.u = b
e.y = m
e.z = m
e.s = b
k.w = m
k.p = m
k.q = i
k.s = n
k.y = n
n.u = i
n.p = e
n.s = m
n.t = m
n.q = b
i.s = b
i.y = b
i.z = e
i.w = e
i.r = e
i.q = n
assert e.s.v.s.v.s.txt == "b"