class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: J = None
        self.p: A = None
        self.o: I = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.s: H = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: F = None
        self.t: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: J = None
        self.p: A = None
        self.o: I = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: B = None
        self.s: H = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: F = None
        self.t: B = None
        self.p: B = None
        self.txt = txt

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

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