class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: D = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.q: D = None
        self.y: A = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

l = A("l")
c = B("c")
a = C("a")
k = D("k")
d = E("d")
f = F("f")

l.t = f
c.u = a
c.y = a
c.t = k
c.r = l
a.z = f
a.s = c
a.w = k
k.v = l
k.t = a
k.z = c
k.w = f
d.p = c
d.t = c
d.z = k
d.q = k
d.y = l
d.r = f
f.v = l
f.x = l
f.q = c
assert a.s.y.w.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: D = None
        self.r: A = None
        self.y: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.q: D = None
        self.y: A = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

l = A("l")
c = B("c")
a = C("a")
k = D("k")
d = E("d")
f = F("f")

l.t = f
c.u = a
c.y = a
c.t = k
c.r = l
a.z = f
a.s = c
a.w = k
k.v = l
k.t = a
k.z = c
k.w = f
d.p = c
d.t = c
d.z = k
d.q = k
d.y = l
d.r = f
f.v = l
f.x = l
f.q = c
assert a.s.y.w.t.s.txt == "c"