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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: E = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

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

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

f = A("f")
h = B("h")
m = C("m")
n = D("n")
k = E("k")
d = F("d")

f.w = d
f.y = d
f.t = n
f.q = k
h.s = n
m.q = h
m.s = k
m.o = n
m.t = n
n.w = m
n.q = m
n.x = k
n.z = d
k.x = m
k.z = m
k.v = n
k.p = h
d.z = n
d.x = n
d.q = f
d.v = m
d.u = m
d.y = m
assert k.v.q.o.x.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: D = None
        self.y: F = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: E = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

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

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

f = A("f")
h = B("h")
m = C("m")
n = D("n")
k = E("k")
d = F("d")

f.w = d
f.y = d
f.t = n
f.q = k
h.s = n
m.q = h
m.s = k
m.o = n
m.t = n
n.w = m
n.q = m
n.x = k
n.z = d
k.x = m
k.z = m
k.v = n
k.p = h
d.z = n
d.x = n
d.q = f
d.v = m
d.u = m
d.y = m
assert k.v.q.o.x.z.t.txt == "n"