class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.p: F = None
        self.w: I = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: G = None
        self.s: I = None
        self.w: A = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: B = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: A = None
        self.w: D = None
        self.u: B = None
        self.r: B = None
        self.y: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

k = A("k")
f = B("f")
c = C("c")
e = D("e")
d = E("d")
i = F("i")
m = G("m")
n = H("n")
b = I("b")

k.x = f
k.r = f
k.p = i
k.w = b
k.t = b
f.z = e
f.y = k
f.w = m
f.q = n
c.u = b
c.v = b
c.z = e
c.s = k
c.x = n
c.t = d
e.v = k
e.w = k
e.q = m
e.o = m
e.s = b
e.x = n
d.o = m
d.w = f
d.p = f
d.t = b
i.v = b
i.p = k
i.w = e
i.t = e
i.u = f
i.r = f
i.y = m
m.z = n
m.r = e
n.q = c
n.v = i
b.z = n
assert i.u.q.q.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.p: F = None
        self.w: I = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: G = None
        self.s: I = None
        self.w: A = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: B = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: A = None
        self.w: D = None
        self.u: B = None
        self.r: B = None
        self.y: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

k = A("k")
f = B("f")
c = C("c")
e = D("e")
d = E("d")
i = F("i")
m = G("m")
n = H("n")
b = I("b")

k.x = f
k.r = f
k.p = i
k.w = b
k.t = b
f.z = e
f.y = k
f.w = m
f.q = n
c.u = b
c.v = b
c.z = e
c.s = k
c.x = n
c.t = d
e.v = k
e.w = k
e.q = m
e.o = m
e.s = b
e.x = n
d.o = m
d.w = f
d.p = f
d.t = b
i.v = b
i.p = k
i.w = e
i.t = e
i.u = f
i.r = f
i.y = m
m.z = n
m.r = e
n.q = c
n.v = i
b.z = n
assert i.u.q.q.v.z.txt == "n"