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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: E = None
        self.z: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: D = None
        self.s: D = None
        self.z: A = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

n = A("n")
b = B("b")
l = C("l")
k = D("k")
i = E("i")
f = F("f")
h = C("h")
m = F("m")

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: E = None
        self.z: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: D = None
        self.s: D = None
        self.z: A = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

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

n = A("n")
b = B("b")
l = C("l")
k = D("k")
i = E("i")
f = F("f")
h = C("h")
m = F("m")

n.w = k
n.z = i
n.v = h
n.r = m
b.z = h
b.t = i
b.q = i
b.w = k
b.s = n
l.q = f
l.o = m
l.u = b
k.t = b
k.v = i
k.z = n
k.q = m
i.t = h
i.q = k
i.s = k
i.p = k
i.u = k
i.z = n
f.w = n
f.x = n
f.q = k
f.z = i
f.p = b
h.q = m
h.o = f
h.u = b
m.w = n
m.x = n
m.q = k
m.z = i
m.p = b
assert k.q.x.z.txt == "i"