class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: F = None
        self.o: G = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: H = None
        self.x: I = None
        self.s: H = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.o: A = None
        self.p: G = None
        self.w: A = None
        self.r: G = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.t: F = None
        self.s: E = None
        self.p: B = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: H = None
        self.x: I = None
        self.s: H = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: A = None
        self.o: A = None
        self.p: G = None
        self.w: A = None
        self.r: G = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.t: F = None
        self.s: E = None
        self.p: B = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

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

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