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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

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

k = A("k")
d = B("d")
m = C("m")
i = D("i")
j = E("j")
l = F("l")

k.z = l
k.v = i
k.y = m
k.u = d
d.x = j
d.w = j
m.v = j
m.u = j
m.x = i
m.s = i
m.r = i
m.z = k
i.r = l
i.q = j
j.x = m
j.z = m
j.u = d
j.v = d
j.t = l
j.s = l
l.w = i
l.t = j
l.y = j
assert m.z.u.x.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: D = None
        self.y: C = None
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: E = None
        self.txt = txt

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

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

k = A("k")
d = B("d")
m = C("m")
i = D("i")
j = E("j")
l = F("l")

k.z = l
k.v = i
k.y = m
k.u = d
d.x = j
d.w = j
m.v = j
m.u = j
m.x = i
m.s = i
m.r = i
m.z = k
i.r = l
i.q = j
j.x = m
j.z = m
j.u = d
j.v = d
j.t = l
j.s = l
l.w = i
l.t = j
l.y = j
assert m.z.u.x.t.w.txt == "i"