class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: E = None
        self.z: D = None
        self.o: B = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.t: D = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

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

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

c = A("c")
b = B("b")
f = C("f")
e = D("e")
l = E("l")
j = F("j")

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.t: D = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

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

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

c = A("c")
b = B("b")
f = C("f")
e = D("e")
l = E("l")
j = F("j")

c.s = b
c.o = b
c.y = l
c.z = e
c.q = e
b.t = c
f.o = b
f.w = b
f.t = e
f.q = l
f.r = c
e.t = c
e.z = j
e.x = j
e.u = b
l.r = b
l.t = b
j.p = f
j.v = e
j.u = b
assert f.w.t.q.txt == "e"