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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: J = None
        self.r: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: B = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: D = None
        self.y: A = None
        self.q: G = None
        self.p: J = None
        self.o: D = None
        self.u: C = None
        self.x: B = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.x: D = None
        self.u: F = None
        self.q: G = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: J = None
        self.r: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: B = None
        self.w: B = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: D = None
        self.y: A = None
        self.q: G = None
        self.p: J = None
        self.o: D = None
        self.u: C = None
        self.x: B = None
        self.v: C = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.x: D = None
        self.u: F = None
        self.q: G = None
        self.y: B = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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