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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.u: D = None
        self.w: A = None
        self.txt = txt

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

e = A("e")
i = B("i")
d = C("d")
k = D("k")
b = E("b")
l = F("l")

e.q = i
e.p = i
e.w = b
e.x = d
e.o = k
i.w = e
d.t = l
d.z = k
d.s = b
d.r = i
k.t = l
b.r = i
b.x = i
b.u = k
b.w = e
l.s = e
l.w = e
l.u = e
l.o = d
l.t = i
assert i.w.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: E = None
        self.p: B = None
        self.x: C = None
        self.o: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.u: D = None
        self.w: A = None
        self.txt = txt

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

e = A("e")
i = B("i")
d = C("d")
k = D("k")
b = E("b")
l = F("l")

e.q = i
e.p = i
e.w = b
e.x = d
e.o = k
i.w = e
d.t = l
d.z = k
d.s = b
d.r = i
k.t = l
b.r = i
b.x = i
b.u = k
b.w = e
l.s = e
l.w = e
l.u = e
l.o = d
l.t = i
assert i.w.x.z.txt == "k"