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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

k = A("k")
g = B("g")
n = C("n")
b = D("b")
a = E("a")
m = F("m")
i = D("i")

k.z = m
k.o = g
k.s = a
k.q = i
k.r = n
k.w = n
g.o = k
g.r = k
g.z = n
n.w = b
b.r = k
b.v = k
b.t = g
b.q = n
b.o = m
a.u = k
a.z = b
a.q = b
a.s = n
m.o = n
m.y = n
m.w = a
m.t = a
m.v = g
m.u = g
i.r = k
i.v = k
i.t = g
i.q = n
i.o = m
assert a.z.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: B = None
        self.s: E = None
        self.q: D = None
        self.r: C = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

k = A("k")
g = B("g")
n = C("n")
b = D("b")
a = E("a")
m = F("m")
i = D("i")

k.z = m
k.o = g
k.s = a
k.q = i
k.r = n
k.w = n
g.o = k
g.r = k
g.z = n
n.w = b
b.r = k
b.v = k
b.t = g
b.q = n
b.o = m
a.u = k
a.z = b
a.q = b
a.s = n
m.o = n
m.y = n
m.w = a
m.t = a
m.v = g
m.u = g
i.r = k
i.v = k
i.t = g
i.q = n
i.o = m
assert a.z.t.z.txt == "n"