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

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

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

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

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

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

c = A("c")
l = B("l")
n = C("n")
k = D("k")
a = E("a")
m = F("m")
e = E("e")

c.w = a
c.t = a
c.s = l
c.y = k
l.t = e
n.r = k
n.s = m
n.w = m
n.o = m
n.z = l
k.u = c
a.o = c
m.w = n
m.v = n
m.t = l
m.p = l
m.u = l
m.q = k
e.o = c
assert e.o.y.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.y: D = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

c = A("c")
l = B("l")
n = C("n")
k = D("k")
a = E("a")
m = F("m")
e = E("e")

c.w = a
c.t = a
c.s = l
c.y = k
l.t = e
n.r = k
n.s = m
n.w = m
n.o = m
n.z = l
k.u = c
a.o = c
m.w = n
m.v = n
m.t = l
m.p = l
m.u = l
m.q = k
e.o = c
assert e.o.y.u.w.txt == "a"