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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.s: C = None
        self.t: F = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.s: C = None
        self.t: F = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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