class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.u: D = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.p: H = None
        self.x: I = None
        self.t: I = None
        self.v: A = None
        self.y: I = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.u: A = None
        self.p: D = None
        self.q: H = None
        self.z: I = None
        self.x: D = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.p: B = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.u: I = None
        self.s: C = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.x: F = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.p: H = None
        self.x: I = None
        self.t: I = None
        self.v: A = None
        self.y: I = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.u: A = None
        self.p: D = None
        self.q: H = None
        self.z: I = None
        self.x: D = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.p: B = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.u: I = None
        self.s: C = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.x: F = None
        self.r: H = None
        self.txt = txt

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

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