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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

l = A("l")
a = B("a")
b = C("b")
n = D("n")
m = E("m")
d = F("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

l = A("l")
a = B("a")
b = C("b")
n = D("n")
m = E("m")
d = F("d")

l.t = d
l.z = n
l.o = a
l.y = m
a.t = d
a.u = d
a.y = d
a.s = l
a.w = l
b.u = l
b.z = l
b.s = a
n.p = d
n.o = d
n.w = d
n.s = d
n.t = a
n.y = b
m.u = n
m.s = b
m.z = b
d.z = a
d.q = m
d.y = m
d.s = b
assert a.u.z.s.y.u.t.txt == "a"