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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.v: A = None
        self.o: E = None
        self.z: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.v: A = None
        self.o: E = None
        self.z: A = None
        self.p: E = None
        self.txt = txt

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

a.u = m
a.t = b
a.s = b
a.y = b
m.y = e
m.s = l
e.y = a
e.x = a
l.s = e
l.o = e
l.y = a
l.t = d
l.w = d
l.x = b
d.z = e
d.r = e
d.y = b
d.q = m
d.s = l
b.y = d
b.o = d
b.p = d
b.r = a
b.v = a
b.z = a
assert a.u.y.x.t.p.q.txt == "m"