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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.x: G = None
        self.o: A = None
        self.z: D = None
        self.u: G = None
        self.v: C = None
        self.t: E = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.t: I = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.u: H = None
        self.v: F = None
        self.y: B = None
        self.q: D = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.x: G = None
        self.o: A = None
        self.z: D = None
        self.u: G = None
        self.v: C = None
        self.t: E = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.t: I = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.u: H = None
        self.v: F = None
        self.y: B = None
        self.q: D = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: B = None
        self.txt = txt

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

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