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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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