class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.w: G = None
        self.s: G = None
        self.u: F = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: E = None
        self.x: H = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: D = None
        self.x: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.r: B = None
        self.y: C = None
        self.v: E = None
        self.p: A = None
        self.x: A = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.z: B = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: E = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: B = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: E = None
        self.x: H = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: D = None
        self.x: G = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.r: B = None
        self.y: C = None
        self.v: E = None
        self.p: A = None
        self.x: A = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.z: B = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: E = None
        self.x: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: B = None
        self.o: F = None
        self.v: D = None
        self.txt = txt

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

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