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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = 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.s: C = None
        self.w: C = None
        self.txt = txt

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

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

e.w = l
c.s = m
c.t = m
c.x = a
l.u = c
l.s = e
m.u = e
b.s = l
b.w = l
a.z = m
a.p = c
a.u = c
a.s = e
assert e.w.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = 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.s: C = None
        self.w: C = None
        self.txt = txt

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

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

e.w = l
c.s = m
c.t = m
c.x = a
l.u = c
l.s = e
m.u = e
b.s = l
b.w = l
a.z = m
a.p = c
a.u = c
a.s = e
assert e.w.u.t.txt == "m"